Home

Tuesday, 3 January 2023

sfdc-learn #8 : Set Assignment Expiration on Permission Sets and Permission Set Groups

  If you had a requirement to temporarily (for some time duration) grant access to a permission set or permission set group. This we can achieve now by enabling following feature:

 Go to setup. Then, in Quick Find at the top left, type in “User Management Settings”. Next, navigate to the setting called Permission Set & Permission Set Group with Expiration Dates , and turn the switch to Enabled and try to assign permission set and permission set group on user.


Enable this feature:


Assign Permission set to user and select expiration duration and save.                                                                                             
                                                                                           



Assign Permission set group to user and select expiration duration and save.                               
                                              


Monday, 2 January 2023

sfdc-learn #7 : Parameterized Custom Label

We can use parameters in custom label by using String.format(string, List<Parameters>) function.

This function contains first parameter as string label and second parameter is List of parameter.

Example:

 Custom Label name: Parameterized_Custom_Label

  Label value: Hi,{0} welcome to {1}-{2}.

    

List<String> parameters = new List<String>();

parameters.add('Test');

parameters.add('sfdc');

parameters.add('learn');

String strLabel = Label.Parameterized_Custom_Label;

String value = String.format(strLabel, parameters);

System.debug('value::'+value);


Output:

16:57:19:008 USER_DEBUG [7]|DEBUG|value::Hi, Test welcome to sfdc-learn.