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
Ivan sklyarov 2Ivan sklyarov 2 

how can I set custom value in environment or user storage?

I need to save custom data set or value somewhere in salesforce. that value wil relates just to current user. So I need something like env variables or global user storage.

If yes. is it possible to make through api access? 

Will happy if someone can help me with that issue.

Best Answer chosen by Ivan sklyarov 2
Abdul KhatriAbdul Khatri
I am not clear from your custom data set but there is a concept of Custom Settings in Salesforce that you can use but it should not be used for last amount of data set. Here is the link, I hope that is what you are looking for

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_customsettings.htm

Since your settings seems to be bound by user, I would recommend to use Hierarchical Custom Setting as it work on three different levels:
  1. Organization, the default value for everyone
  2. Profile, which overrides the Organization value
  3. User, which overrides both Organization and Profile values
You can find plenty of examples for how to use them.
 

All Answers

Abdul KhatriAbdul Khatri
I am not clear from your custom data set but there is a concept of Custom Settings in Salesforce that you can use but it should not be used for last amount of data set. Here is the link, I hope that is what you are looking for

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_customsettings.htm

Since your settings seems to be bound by user, I would recommend to use Hierarchical Custom Setting as it work on three different levels:
  1. Organization, the default value for everyone
  2. Profile, which overrides the Organization value
  3. User, which overrides both Organization and Profile values
You can find plenty of examples for how to use them.
 
This was selected as the best answer
Ivan sklyarov 2Ivan sklyarov 2
is it possible to set such custom settings through api ?
Abdul KhatriAbdul Khatri
Yes, you can update values. It just work as any other SObject. Read the link
Abdul KhatriAbdul Khatri
Was this helpful?
Ivan sklyarov 2Ivan sklyarov 2
yes, thanks !