0

I have a custom object called Gym_Issue that has a field called Gym_Issue Name (a default field created by Force platform) and a Contact lookup field.

I would like to populate Gym_Issue Name by code (or using workflow) so that its value is a concatenation of Contact.Lastname + Today's Date (YYYY-MM-DD-HH24-MM).

I do not want autonumber ID for the column Gym_Issue Name.

What is good way of achieving this ?

  • Why don't use a formula? – kurunve Feb 4 '16 at 9:07
  • SO you first you need to change Gym_Issue Name Field from autonumber to Text field. You can do it from your custom object definition. After that use workflow to update your Name text field. – Ratan Paul Feb 4 '16 at 9:07
0

You may use WF field update on GYM_Issue object to achieve this. In "Field to update", select "Name" and then select "Use a formula to set the new value". Specify the formula:

Contact.Lastname + Today()

Thats it.

Please note that name is a required field, so the user will still have to enter some value. As soon as the record is saved the name field will be updated with the formula we set in WF field update.

  • How can the Name field be populated with the formula WITHOUT the user having to enter some value ? (ie. as soon as the user has select the Contact lookup, the Name field is to updated). Can WF field update be called as soon as the lookup has been completed ? – Tickle Me Feb 4 '16 at 16:10
  • Unfortunately No. If you really need to populate the name field automatically on the new/edit page, you will have to override the new/edit page. – Shailesh Deshpande Feb 5 '16 at 5:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.