You need to sign in to do that
Don't have an account?
developer_force
help needed in writing a trigger
Hi,
Help needed in writing a trigger for the following logic.Org is using Person Accounts
if RecordType= personaccount some 'test' field should be populated to 'firstname+lastname+middlename '
Thanks
You shouldnt even need a trigger for this, formula would work just fine.
First + Last + Middle
Or are you looking for other automation that I am missing?
PB
Inorder to auto populate a formula field(say some 'abc' field) we created this 'test' field which is a lookup to contact.
This 'test' field should be created on Account level in person Accounts and we have two record types here
PersonAccount and Business account.
so inorder for the 'abc' field to be generated , this 'test' field should be auto populated to Account name i.e,
if its person Account then the 'test ' field should be populated to firstname+lastname+middlename and if its businessAccount it should be populated to just Name.
so i need to write a trigger on Ac ount to populate this 'test' field and the logic for the trigger should be
if(RecordType= personaccount) test field shoud be firstname+lastname+middlename else Name
hope this is clear