You need to sign in to do that
Don't have an account?

Required field to be updated while saving a record.....
I have two fields "X" and "y" both are text fields.And i want these two fields to be concatenated in a required text field called "name" in an object.Please help me.....
1. Using Formulas
Let teh field in which you want the concatenated value to be stored as Formula Field & just put a formula to concatenate say i want to concatenate Name and Number of Account into Billing city formula field then I would write the formula as "Name & AccountNumber".
This will be a read only field & you cannot edit it.
2. Using Workflows
1. Go to workflows. Click New Rule. Select the Object say Account.
2. In Step 2, Give the Rule a proper name.Put criteia as Account Name is not equal to null which means for all accounts this workflow will run.Keep the evaluation criteria as Created and Edited.Click Next.
3. Add a workflow action, New Field Update.Give it a name and select the field in which you want the concatenation to be updated.
4. Select Use Formula to set the new value.
5. In the Formula editior, select the 2 fields which you want to concatenate in a single field. Say I want to concatenate the Account Name & Account Number in the Billing city. I will write in the formula "Name & AccountNumber" & click Save.
6. Done & Activate.
7. Once you Save a record the Account Name and Number will be concatenated and put in the Billing City.
Important :
If this is what you where looking for then please mark it as a solution for others benefits.
Thank You
Simply create a formula field of type text to concatenate two fields x and y.
formula field --> type text
Name = x& ", " & y
Now this will automatically populate the concatenated result of x and y, whenever you will create or update the record
Please Mark this as Answer if it helps you
--
Regards,
Grazitti Team
Web: www.grazitti.com
Email: sfdc@grazitti.com
You can write the trigger on the Object:
In trigger you have to concatenate the both field value and assign to the name field.
Example:
trigger updateRequiredField on Account(before insert, before update){
for(Account acct : Trigger.New){
acct.Name = acct.XField_APIName +'-'+ acct.YField_APIName;
}
}
in above code, I took examples of Account Sobject.
Based on the object API name & Field API name, you have to update.
Please let me know if you find any issue.
Thanks & Regards,
Ranjeet Singh.
and use the same formula to do the field update-->
Name = x& " " & y
Regards,
Grazitti Team
Web: www.grazitti.com
Email: sfdc@grazitti.com
--yvk