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
GeetuGeetu 

Help in creating trigger

Hi I need help in creating trigger - 
I have agreement object under which activity history tab is there. So, when ever a agreement is singed via docusign a activity is pushed into salesforce Activity history, having subject as 
Agreement E-signed By <Agreement Signername > @timestamp (e.g. @2018-11-19T22:57:35 GMT)

so i have a requirement to find out if this agreement is singed by customer or by Agreement sender. 
Our approach is to have trigger on actviity history, when ever therr is a record insertion we need to check 
if subject contains " E-signed" then we need to take values after BY and before @ to capture who has singed it. And then search in salesforce user, if this user exits. If yes, then mark a custom flag on agreemnt object "USER_FLG_SIGN" to Y if not then make "CUSTOMER_FLG" on agreemtn object to Y. 
how can i do this with Trigger , or please provide suggestions.