You need to sign in to do that
Don't have an account?

can any one help me in this after update trigger?
Hi all,

its problem is, in after update, the fields of description__c, field__C nor updating.,
rest of first name, last name, required fields of updating.,
why?
anyone can help me.,
Thanks,
Sriram.R
its problem is, in after update, the fields of description__c, field__C nor updating.,
rest of first name, last name, required fields of updating.,
why?
anyone can help me.,
Thanks,
Sriram.R
its problem is, in after update, the fields of description__c, field__C nor updating.,
rest of first name, last name, required fields of updating.,
why?
Thanks,
Sriram.R
First of all if you need to update the same object then the best way is to perform the operation in before trigger.
Place the same code in before update trigger it will work. As well as it will save your SOQL and trigger won't run into recussrion..
Coming back to your original code:
Basic excution flow of trigger is when a record is inserted, updated or deleted the trigger will fire.
In your code you have wriiten a statement to initialise the description__c and field__c in both before as well as after update, so whatever changes you are making in after update is getting overwritten when trigger is getting fired by before update code.
Your First_Name__c and Last_Name__c is not used in before trigger so the values are not getting overwritten and it is holding the value you have provided in after trigger.
If you find the above solution helpful. Please mark as Best Answer to help others too.
Thanks and Regards,
Santosh Kumar