function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Updating the stage of an opp when an echosign agreement has been signed.

I know little about coding and wanted to see if I can get a little help in coding.


I would like the stage of an opportunity to be changed to 'Closed' when an echosign agreement comes back 'Signed'


Thank you for any help with this.




You can write a Trigger on EmailMessage object and can check if the echosign agreement field is equal to 'signed' ,update the opportunity status field to 'Closed'

Here is the basics.
This crosses objects that is not allowed standard.
You will need to update this by swapping Account with opportunity info and user with agreement info.
Throw an if statement in there before you include the field update.
Very vague but I hope it helps..

trigger setAccountOwnerName on Account (before insert, before update){

Map<Id,String> userMap = new Map<Id, String>();

for (User u : [Select Id, Name From User]) {
userMap.put(u.Id, u.Name);
for (Account a : Trigger.New) {
a.Owner_Name__c = userMap.get(a.OwnerId);