new SfNativeApi()
contains native Salesforce methods available in Salesforce OpenCTI API.
Methods
runApex(params) → {Promise}
Executes an Apex method from an Apex class that’s exposed in Salesforce.
sfNativeApi.runApex({apexClass: "CaseHelper", methodName: "acceptCase", caseId=500A0000000flRF});
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object
|
Parameters
|
Returns:
- Type:
-
Promise
Promise represents result of the operation.
screenPop() → {Promise}
Screenpops Salesforce page
Please see Salesforce documentation for description of method parameters. The method returns promise with the result of execution so callback parameter is not used.
For Lighting mode: https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_screenpop_lex.htm
sfNativeApi.screenPop({type: 'sobject', params: {recordId: '500A0000000flRF'});
For Classic mode: https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_screenpop.htm Parameters are grouped in object
sfNativeApi.screenPop({url: '500A0000000flRF', force: true});
Returns:
- Type:
-
Promise
Promise represents result of the operation.