salesforce

Sometimes we are very close to cross governer limit in soql and we  want to Update  Salesforce Object Fields.

If you have object id available you can easily get  object fields without using soql and perform any dml on it

here is the code  for the getting object fields using object id :

here var is the variable in which object id is stored.

// creating a new instance of object

SIS_Student__c stu = new SIS_Student__c();

// assigning id to new instance
stu.Id = var;
stu.First_Name__c = firstname;
stu.Onboarding_Complete__c = True;

// performing dml operation on object
update stu;

Hits: 548

Share Post

By Himanshu Rana

My Name is Himanshu Rana, 23 Years young, born and grow up in Ghaziabad, India. A High Spirited Salesforce Admin, Developer and a Blogger. I currently work at Wakencode Technologies,

Leave a Reply

Your email address will not be published. Required fields are marked *