+ Start a Discussion
jeba mjeba m 

A required field to be updated by concatenating two fields into it while saving a record.........

Hi I have a REQUIRED TEXT FIELD in a custom object and two lookup fields.I want these two lookup fields to be concatenated in a "REQUIRED TEXT FIELD called NAME".Please help me to sort out this.........pls
Boris BachovskiBoris Bachovski
Have you tried creating a workflow that will update the value of your required field with the lookup values? If that doesn't help then you'll need to write a "before trigger" on your object, that will look something like this:

trigger Contact on Contact (before insert, before update)
	for (Contact c : trigger.new)
		c.REQUIREDFIELD__c = c.Lookup1__c + c.Lookup2__c;

Vatsal KothariVatsal Kothari

You can also do it with Workflow rule.

Create New workflow rule with Evaluation Criteria as Evaluate the rule when a record is created, and every time it’s edited & inside rule criteria just give true.

And use field update, update textfield with concatenation of two lookup fields.

If this solves your problem, kindly mark it as the best answer.