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
MILKMILK 

apex trigger

I am new to Apex & Trigger

I have created 2 custom object o1 and o2 

now i want to update  field  (field is called idfield )of o2 to id of o1 if max(id) of o2 after insert  one record in o1

please help me to get code for this !!Thanks!!!!!!!!

souvik9086souvik9086

"now i want to update  field  (field is called idfield )of o2 to id of o1 if max(id) of o2 after insert  one record in o1"

 

Can you be little more clear on the requirement so that analysis can be better?

 

Thanks

MILKMILK

 

one object is called membership_title__c and another object  is called membership_used__c

if insert one membership_used__c records of the account ,then max(id) of membership_title__c of the account is linked with the 'membership_used__c'

Million Thanks!!!!

 

 

MILKMILK

Any idea?