function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Edward Foreaker 2Edward Foreaker 2 

How To: Save button method for Desktop and Mobile.Thanks.

The saveSignature method is working for desktop only. I am trying to get the saveSignature() redirect to work on the mobile lightning app also. Could you see below and advise if the visualforce script/apex method can be adjusted to redirect to the lightning mobile object(tablet/mobile form factor) as it properly does on desktop? 

ehsSignatureExtensionController Extension - Desktop Page Ref Part of the Apex 
public pageReference saveSignature(){ pageReference page = new PageReference('https://company.lightning.force.com/lightning/r/work_order__c/'+ehs.id +'/view'); page.setRedirect(true); return page; }



Visualforce Page saveSignature() Script
function saveSignature() { 
var image = canvas.toDataURL().split(',')[1];         ehsSignatureExtensionController.saveSignature(ehsId,image,handleResult); } function handleResult(result,event) { if(result.success) { window.top.location.href='/'+ehsId; } else { alert('Error: '+result.errorMessage); } }

 
VinayVinay (Salesforce Developers) 
HI Edward,

You can reach out to Salesforce for iOS/Android group.

https://trailhead.salesforce.com/trailblazer-community/groups/0F9300000001qepCAA?tab=discussion&sort=LAST_MODIFIED_DATE_DESC

Thanks,