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
SKollcakuSKollcaku 

Which trigger/wf to change automatically the label of a field based on the value of another field?

Hi,

I need to change automatically the label of a field based on the value of Account Record Type.
I tried with the workflow (validation rules), but I think it is not the right way to achieve this (I could only get messages, but not change the label of the other field). 
Where can i find such examples, maybe using triggers (or process build or flows?


Thanks,
Skender
Best Answer chosen by SKollcaku
Shashikant SharmaShashikant Sharma
Hi Skender,

Field Label is part of metadata so you can not update it directly from trigger or workflow rule. One more thing that Field Label can not be made specific to record based on record type. So it will be one for the field not specific to record.

In case you want to use different labels based on record type of record then override that view ( detail or edit ) based on your need with visualforce page. Then you could conditionally put label of the field based on record type.

Thanks
Shashikant
 

All Answers

Shashikant SharmaShashikant Sharma
Hi Skender,

Field Label is part of metadata so you can not update it directly from trigger or workflow rule. One more thing that Field Label can not be made specific to record based on record type. So it will be one for the field not specific to record.

In case you want to use different labels based on record type of record then override that view ( detail or edit ) based on your need with visualforce page. Then you could conditionally put label of the field based on record type.

Thanks
Shashikant
 
This was selected as the best answer
SKollcakuSKollcaku
Hi Sharma,

I also think that it is not worth developing the visualforce page for this task.

Thanks for your immediate response,
Skender