You need to sign in to do that
Don't have an account?

**URGENT && CRITICAL ****** - Visualforce for converting javascript to Lightning button -
<apex:page standardController="Opportunity"> <apex:includeScript value="../../soap/ajax/20.0/connection.js"/> <script> sforce.connection.sessionId='{!GETSESSIONID()}'; var oppObj = new sforce.SObject("Opportunity"); var accCnt = sforce.connection.query("SELECT Id from Opportunity where accountid ='{!Opportunity.AccountId}' and recordtypeId = '0120J000000VFDN' "); if(accCnt.size > 0){ oppObj.Id = '{!Opportunity.Id}'; oppObj.RecordTypeId = '0120J000000VFDS'; oppObj.stagename = 'Open'; var result = sforce.connection.update([oppObj]); if (result[0].success=='false') { alert(result[0].errors.message); } else { window.location = "/" + result[0].id + "/e" + "?retURL="+ result[0].id; } }else { alert ('Please create a Parent Contract. Then convert this to Child Contract. Please close the pop-up window'); } </script> </apex:page>
The above code works fine but i get popup with cancel button whih is not the present scope
PLEASE HELP
When the button is clicko on lightning the VF page is opened in the popup with cancel button.
try below code.
Use below code. I am using apex controller instead of javascript.
Still the popup comes :(
These are the limitations from salesforce side.