+ Start a Discussion
Jim Parker 7Jim Parker 7 

Transform Javascript to VisualForce Button

Hi everyone - trying to transform my Javascript button to a VisualForce or URL button so that is shows up in SF1.  Don't really know where to start.  This is the existing button.
 
{!RequireScript("/soap/ajax/34.0/connection.js")} 

if("{!Wire_Template__c.Template_Status__c}" =="Approved"){
var base = '' //system.URL.getSalesforceBaseUrl(); 
var url = base+encodeURI('/flow/Wire_Template_Transfer_from_Locked_Template?WireTemplateId={!Wire_Template__c.Id}&retURL=a04/o'); 

window.open(url)
}

else{
alert("Please submit the template for approval prior to submitting a wire.");
}

 
GauravGargGauravGarg

Hi Jim,

As of now Custom button's are not allowed in SF1, but there is one workaround. Please go through below url. 

https://developer.salesforce.com/forums/?id=906F0000000AWfoIAG

Thanks,

Gaurav
Skype: gaurav62990