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
RAJU_DEEPRAJU_DEEP 

Problem in Formula field.

Hello,

In my case i want to populate one of the field value automatically and the value should be the id of the current user logged in i.e. username. For this i used formula field which should do this and it is working but the problem is whenever I open that particular record through different user login(means System Administrator login and the subordinate user login) this particular field value changes asper the user, as it should be constant after the record once inserted. Can anyone help me to sort out this issue.

The code which i used in the formula field is:

$User.Username

 

Regards

Raju

Best Answer chosen by Admin (Salesforce Developers) 
MandyKoolMandyKool

Hi,

 

Use Formula field when u want to pull data from another object.

For your case you can have a Workflow, which will run for "Only when a record is created", with a field update.

 

So that once a record is created "Logged in users" value will not change.

 

Also, as mentioned by kritin u can use owner field as well in your formula.

Hope this will help.

All Answers

kritinkritin

Here you should to use Owner not User.

 

Owner.Name

MandyKoolMandyKool

Hi,

 

Use Formula field when u want to pull data from another object.

For your case you can have a Workflow, which will run for "Only when a record is created", with a field update.

 

So that once a record is created "Logged in users" value will not change.

 

Also, as mentioned by kritin u can use owner field as well in your formula.

Hope this will help.

This was selected as the best answer
RAJU_DEEPRAJU_DEEP

Hi

Thanks for your suggestion, it realy works.

 

Regards

Raju