Using Dynamic Apex we can achieve this :
1 | //Lets assume this is record Id |
2 | Id recId = 'a0P9000000ESXcV' ; |
3 |
4 | Schema.SObjectType token = recId.getSObjectType(); |
5 | Sobject s = token.newSobject(); |
6 | s.put( 'Id' ,recId ); |
7 | s.put( 'Name' , 'om' ); |
8 | update s; |
No comments:
Post a Comment