For our use case scenario, we had to have an intermediate page and based on record type of Case , we need to redirect to the standard edit page or another VF page. We created a page and overrode standard 'New' and 'Edit' buttons with the same
We are doing something like this on page load (based on Record Type being R1 or not):
//check if page is loaded in SF1
var recordType = '{!caseRecordType}';
if ( (typeof sforce != 'undefined') && (sforce != null) ) {
if(recordType != 'R1'){
var caseId = '{!c.Id}';
if(caseId == '' || caseId == null)
sforce.one.createRecord("Case",recTypeId);
else{
//wanna go to standard edit mobile page
/*this still obeys over-riding rules and goes to back to this page and the whole thing goes in a loop */
sforce.one.editRecord(caseId);
}
}
Question is Is there an alternative for the above edit mode ?
URLString like '/50063000002xSLPAA2/e?retURL=https%3A%2F%2Ftbct--devsandbox--c.cs43.visual.force.com%2F50063000002xSLPAA2&nooverride=1' and using : sforce.one.navigateToURL(URLString);
is not working either :(
Any workarounds would be greatly appreciated ! We finally want a way to navigate to standard edit screen on mobile through JS script or anything!
Thanks guys !