You need to sign in to do that
Don't have an account?
developer_force
help needed in writing a trigger
can anyone please help me in writing a trigger which should populate some 'test' field to the Account name.
If its business account 'test' field should be populated to just 'Name'
If its Person Account , 'test' field should be populated to 'FirstName+MiddleName+LastName'
Thanks
I think this can be done using work flow field update?
I hope record type is PersonAccount and BusinessAccount, is it? If yes, then it can be done using WFR.
for copying the field values trigger is not required just create a formula field and give the formula as
if(($RecordType.Name=='Bussiness Account'),Name,FName& Lname)
No,it cannot be created as a formula field because i need that field to be a lookup to contact so that i can access contact fileds since we are using person Accounts. and i dont think Workflow field update can be defined for itt.
I just need a trigger to populate that 'test' field to the name based on the recordtypes
Thanks