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
sudhirn@merunetworks.comsudhirn@merunetworks.com 

Trigger or Workfow

Hi,
 
   Need a suggestion on implementing a trigger or workflow is best in option 

Requirement is have created a custom object with name Territory_Lookup__c it has fields ( Zip,State,Country,Area,Owner,Territory Area,Territory State, Territory Country) 

We will be loading data into this custom object 

In lead,account and contact we have custom fields ( Territory Area, Territory State and Territory Country) based on exisitng fields like state country zip it must lookup in Territory_Lookup__c and get fields 

What is the best approach doing this will workflow or trigger will be best option.

Thanks
Sudhir
Best Answer chosen by sudhirn@merunetworks.com
Arun KumarArun Kumar
Hi Sudhirn,

Go for trigger only. And you can pass as many fields in the filter condition from the standard object as Account , lead to custom object Territory_Lookup__c .

But I think, you need to craete seprate trigger for all your standard object for which you want to do this functioanlity.

Thanks,
Arun

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Lookup Field you can not populate by Workflow. Try Trigger for same
sudhirn@merunetworks.comsudhirn@merunetworks.com
Thanks Amit can you give me example of lookup in trigger because i have more than one fields to pass and get can you suggest me some good example to use
ShivaKrishna(Freelancer)ShivaKrishna(Freelancer)
Hi.. I would suggest you to go for trigger if it is already available on your custom object so that you can even handle workflow limits and future complex requirements. 

Thanks 
Naga (nagasudhakar2014@gmail.com)
Arun KumarArun Kumar
Hi Sudhirn,

Go for trigger only. And you can pass as many fields in the filter condition from the standard object as Account , lead to custom object Territory_Lookup__c .

But I think, you need to craete seprate trigger for all your standard object for which you want to do this functioanlity.

Thanks,
Arun
This was selected as the best answer