HTML
HTML
getOrgDomainUrl()
getSalesforceBaseUrl()
getCurrentRequestUrl()
To redirect users to a specific page in Salesforce after they click Finish:
/flow/flowName?retURL=url
/flow/myFlow?retURL=001/o
You can't redirect flow users to a URL that’s external to your Salesforce org.
REDIRECT DESTINATION | RELATIVE URL (url) | EXAMPLE |
---|---|---|
Chatter | _ui/core/chatter/ui/ChatterPage | _ui/core/chatter/ui/ChatterPage |
Home page | home/home.jsp | home/home.jsp |
List view | objectCode?fcf=listViewId | 006?fcf=00BD0000005lwec |
Object home page, such as Accounts home | objectCode/o | 001/o |
Specific record, such as a contact, report, dashboard, user, profile, or Chatter post | recordId | 0D5B000000SKZ7V |
Visualforce page | apex/pageName | apex/myVisualforcePage |
<component>.js-meta.xml
. lightning__RecordAction
target and specify actionType
as ScreenAction
for a screen action that opens in a window or Action
for a headless action that executes when clicked.As we are creating this action for the Contact Record Page, it is an object-specific action.
If you have any comments or queries about this, please feel free to mention them in the comments section below.
This is a full example that shows how to test an HTTP callout.
CalloutClass
====================
JSON2ApexMock Apex Class
==============================
@isTest
global class JSON2ApexMock implements HttpCalloutMock {
In certain situations, we may need to download many files from Salesforce at once.
Below is the URL format that you need to use:
https://tridentpvtltd.lightning.force.com/sfc/servlet.shepherd/version/download/068aaaaaaaaaa/0684bbbbbbbbR/068cccccccccc
You may get the files as zip files by simply pasting this URL.
Lets suppose we have an array as given below:-
let contactData=[
{Name:'Rahul',Age:'31',CreditScore:750},
{Name:'Rogers',Age:'28',CreditScore:640}
];
Now let takes a requirement, that if the credit score is more than or equals to 700 then the rating should be 'Hot' or if it is less than the 700 rating should be 'Cold' and then add this property to every object of the Array of Objects that we have. And final output will look like as given below:
[
{Name:'Rahul',Age:'31',CreditScore:750,rating:'Hot'},
{Name:'Rogers',Age:'28',CreditScore:640,rating:'Cold'}
]
To achieve this we can use either forEach method or map method.
Using forEach:
let contactData=[
{Name:'Rahul',Age:'31',CreditScore:750},
{Name:'Rogers',Age:'28',CreditScore:640}
];
contactData.forEach(element=>{
if(element.CreditScore>=700)
{
element.rating='Hot';
}
else
{
element.rating='Cold';
}
});
console.log('Final Result is:- '+JSON.stringify(contactData));
Using map:
let contactData=[
{Name:'Rahul',Age:'31',CreditScore:750},
{Name:'Rogers',Age:'28',CreditScore:640}
];
let finaldata=contactData.map(x=>{
if(x.CreditScore>=700)
{
return {...x,rating:'Hot'};
}
else
{
return {...x,rating:'Cold'};
}
});
console.log('Final Result is:- '+JSON.stringify(finaldata));
[
{"Name":"Rahul","Age":"31","CreditScore":750,"rating":"Hot"},
{"Name":"Rogers","Age":"28","CreditScore":640,"rating":"Cold"}
]
If you have any comments or queries about this, please feel free to mention them in the comments section below.