Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

The calls that support Pulsar native screen interaction need to know that you will only see the response when the native screen is dismissed by the user. For example, if your code calls viewObject in edit mode, when the user types the data on the screen and hits save or cancel, you will see the JSAPI response. This way, you can take the appropriate action based on that response. 

refreshLogin

Note

The refreshLogin API will display a login screen to allow the user to refresh their Salesforce credentials and then continue working. This does not force them to enter their credentials, it only presents them with the login screen, where they will be prompted to login. The developer may opt to continue prompting the user using this request if a login did not occur or failed. 

The optional "logout" parameter, when specified, will forcefully logout the user from salesforce, and return the user to the Pulsar login screen, forcing them to login to continue using Pulsar. The user will lose any work that is not saved to the database when this occurs.

Code Block
var request = { 
	"type" : "refreshLogin",
	"data" : { 
		"logout" : 0 // this is a number- default is 0, and a positive value will forcefully logout the user
	}
};
bridge.sendRequest(request, function (responseData) { 
	if ((responseData.type == 'refreshLoginResponse') {
		alert('login success'); 
	} else {
		alert('An error occurred or the login failed: ' + responseData.data);
	}
});

setLeavePageMessage

Note

The setLeavePageMessage API allows you to display a confirmation prompt whenever the user tries to leave the page.  If a message is specified, the user will be prompted to select 'Yes' or 'No' for the Done button press as well as for these web navigation buttons: Refresh, Back, Forward.  To disable this prompt, call this command again with a zero length string.

...