开发者

Copy a value based on criteria Salesforce

开发者 https://www.devze.com 2023-02-09 16:14 出处:网络
On a Salesforce.comopportunity I have a number of custom fields thatare potential options that the end client will eventually select.

On a Salesforce.com opportunity I have a number of custom fields that are potential options that the end client will eventually select.

Option 1 (Desc Field) Option 1 (Value) Option 2 (开发者_开发百科Desc Field) Option 2 (Value) Option 3 (Desc Field) Option 3 (Value)

At a future point the user will ultimately choose one of the options as the preferred option. What I want is then the value for the chosen option to be stored in another field without the user having to enter it again. A “nice to have” would also be that all 3 option descriptions, values and selected value are locked once this is done.

Any ideas?


Two things come to mind:

(1) The second field could be a formula field that derives it's answer based on the first field.

(2) A workflow rule using a field update to set the value of the second field, using a formula

(3) A trigger to do the same as #2.

As far as locking, one semi-popular method to lock a page layout is to essentially have two page layouts. The first layout has the fields normally, the second layout has the fields with "read-only". You then create a record type called "Read Only", for example. After the user has entered some specific information in a specific set of fields, a trigger could then check the record type from the normal default one, to the "Read Only" one. To the user's point of view, the record will be the same, but now he sees it from a different page layout.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号