USE CASE

The ‘OpportunityToQBOE’ button will not be supported if the DBSync installed package version is above 1.5. A new action has to be created in the Salesforce instance inorder to make it work.

SOLUTION

Below are the steps to be followed in order to create the custom visual force page: 

<apex:form style="align:center;text-align:center">

<apex:sectionHeader title="Salesforce QuickBooksOnline Integration" />

<script>

<!-- Creation of Transaction(Invoice, Estimate, SalesReceipt) from Opportunity -->


function createTransaction() {

var URL = "{!$User.AVSFQB__QBOE_DBSync_Server__c}/qboe.m?sfUrl=https://rsps.my.salesforce.com/services/Soap/u/14.0/00D300000000l40={!$User.AVSFQB__QBOE_Connection_Ticket__c}&pdl=processdefinition_SFQB_OpportunityTo{!Opportunity.AVSFQB__Generate_Object__c}.xml&recordId={!Opportunity.Id}&dbsyncId={!$User.AVSFQB__DBSync_Id__c}&profileName={!$User.AVSFQB__DBSync_Profile__c}&sessionId={!$Api.Session_ID}&dbsyncPasswd={!$User.AVSFQB__DBSync_Passwd__c}";

window.open(URL, "DBSync",

"menubar=0,resizable=0,width=650,height=300");

}


<!-- Update Invoice Details from QuickBooks Online -->


function updateInvoice() {

var URL="{!$User.AVSFQB__QBOE_DBSync_Server__c}/qboe.m?sfUrl={!$Api.Partner_Server_URL_320}&qboeCT={!$User.AVSFQB__QBOE_Connection_Ticket__c}&pdl=processdefinition_QBSF_InvoiceToInvoice.xml&recordId={!Opportunity.Id}&dbsyncId={!$User.AVSFQB__DBSync_Id__c}&profileName={!$User.AVSFQB__DBSync_Profile__c}&sessionId={!$Api.Session_ID}&dbsyncPasswd={!$User.AVSFQB__DBSync_Passwd__c}";

window.open(URL,"DBSync","menubar=0,resizable=0,width=650,height=300");

}

</script>

<apex:commandButton value="Create Invoice in QBO" id="theButton1"

onclick="createTransaction()"

style="margin:10px;font-size:15px;padding:10px;" />

<!-- <apex:outputPanel>Creates Transaction in QuickBooks Online from SF Opportunity</apex:outputPanel> -->

<apex:commandButton value="Update Invoice from QBO" id="theButton2"

onclick="updateInvoice()"

style="margin:10px;font-size:15px;padding:10px;" />

<!-- <apex:outputPanel>Updates Invoice Details in Salesforce from QuickBooks Online</apex:outputPanel> -->

</apex:form>

</apex:page>