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

Value trying to update via before update not working
Hello,
I am trying to update a field in before udpate, but the updated value is not taken in to account, even in after update.
Any reason, i am doing wrong.
I am trying to update a field in before udpate, but the updated value is not taken in to account, even in after update.
Any reason, i am doing wrong.
Trigger (){ BeforeUpdate(List<Accounts> listOfAccounts){ TempLoop= SOQL to get listOfAccounts.XYZ__r.Field__c for(Account acc : listOfAccounts){ acc.FieldtoUpdate__c = TempLoop.XYZ__r.Field__c //It dont works } } AfterUpdate(List<Accounts> listOfAccounts){ Print listOfAccounts[0].acc.FieldtoUpdate__c Result: it dont take in to account the updated field value } }
Is this a psuedo code?
Can you please provide the exact code and will check what is the issue.
Thanks!