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

Set Lookup by Salesforce ID
Hi -
I'm trying to set the Corresponding_Sales_VP__c trigger to a specific user record by using their ID. How do i do it?
I'm trying to set the Corresponding_Sales_VP__c trigger to a specific user record by using their ID. How do i do it?
trigger Set_Corresponding_VP on Compensation_Request__c(after insert) { List<Compensation_Request__c> requestsToUpdate = new List<Compensation_Request__c>(); for(Compensation_Request__c reqs : Trigger.new){ reqs.Corresponding_Sales_VP__c = //User Record with id 005j000000FmuFu requestsToUpdate.add(reqs); } update requestsToUpdate; }
Use It, It will work for you.
Thanks
You can directly put the userid in that field.Also you can user before insert trigger instead of after insert. It doesn't require the DML statement to update the record
Thanks,