Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Id objId = 'a0Ci000000vd7xA';
- String objName = ((Id)objId).getSobjectType().getDescribe().getName();
- Type t = Type.forName(objName); //object name
- Sobject myObj = (Sobject)t.newInstance();
- myObj.emp_name__c = 'test';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement