You need to sign in to do that
Don't have an account?
Gar Spencer
Need Help with Apex
Hey can someone help me with a class and trigger?
I need to create a trigger that when record 1 populates fields a, b, c ,d on an account
it will search through all existing accounts and search for fields d,e,f,g that matche record 1's fields a,b,c,d.
then if records are found would populate a list of matching account names (as a hyperlink) to record 1.
and send an email notification to owners of records that were matched to record 1's criteria with the account name of the record 1
I need to create a trigger that when record 1 populates fields a, b, c ,d on an account
it will search through all existing accounts and search for fields d,e,f,g that matche record 1's fields a,b,c,d.
then if records are found would populate a list of matching account names (as a hyperlink) to record 1.
and send an email notification to owners of records that were matched to record 1's criteria with the account name of the record 1
Suneel#8
You want to compare values in fields-a,b,c,d with that of d,e,f,g.Why is it so?Are you trying to get the duplicate accounts?
Gar Spencer
No I have accounts for buyers and accounts for sellers..... record 1 is a buyer account.... they have criteria they are looking for fields a,b,c,d and i want to search the org for a seller account that has field d,e,f,g that match the record 1..... and then I want to create a triger that notifies the owner of the sellers record via email with the buyer Account link in the email.
Suneel#8
Below is the skeleton of the code you can use.Below is the code to identify duplicate accounts with same Name and City.Modify the SOQL and nameSet,citySet collections to compare a,b,c,d fields with f,g,h,i