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
Subodh chaturvedi 5Subodh chaturvedi 5 

How to set different default value for same field based on different profile for a same object ?


There is a field in Employee i.e. Salary, so when P1 profile is inserting a record for salary 2000 will get populated there by default, when a P2 profile is inserting then 3000 should get populated by default like this different user of a different profile when inserting record than their associated default value should get populated. How will I achieve this? 
Alain CabonAlain Cabon
Hello Subodh,

Why don't you use a simple formula with nested IF: 
IF (Owner.Profile.Name = 'P1',3000,IF(Owner.Profile.Name = 'P2',2000,0))

Regards
Alain