2022
...
Step 1 : Navigate to Workflow listing page of the project for which you wish to make changes by Project → processes → workflow.
Step 2 : Click on Edit of the work flow " OpportunityToInvoice " , Replace the reader query from Advanced Query Builder with the the following query and click on Save & Close button.
Code Block |
---|
SELECT Opportunity.Id,Opportunity.AVSFQB__Primary_Contact__r.FirstName,Opportunity.AVSFQB__Primary_Contact__r.LastName,Opportunity.Owner.QB_SalesRep_ID__c, Opportunity.AVSFQB__Primary_Contact__r.Email,Opportunity.AVSFQB__Quickbooks_Id__c,Opportunity.AccountId,LastModifiedDate,Opportunity.Account.Id, Opportunity.Account.CurrencyIsoCode,Opportunity.Account.Name,Opportunity.Account.BillingStreet,Opportunity.Account.BillingCity, Opportunity.Account.BillingState,Opportunity.Account.BillingPostalCode,Opportunity.Account.BillingCountry,Opportunity.Account.ShippingStreet, Opportunity.Account.ShippingCity,Opportunity.Account.ShippingState,Opportunity.Account.ShippingPostalCode,Opportunity.Account.ShippingCountry, Opportunity.Account.Fax,Opportunity.Account.Phone,Name,Description,CloseDate ,(SELECT Quantity,UnitPrice,Description,Opportunity.owner.FirstName, Opportunity.owner.LastName,Opportunity.Id,Opportunity.CloseDate,PricebookEntry.Name,PricebookEntry.Product2.ProductCode,PricebookEntry.Product2.Name, PricebookEntry.Product2.Description,PricebookEntry.Product2.Id,PricebookEntry.UnitPrice,PricebookEntry.Product2.AVSFQB__QuickBooks_ItemType__c FROM OpportunityLineItems) ,Opportunity.Account.AVSFQB__Quickbooks_Id__c,Opportunity.AVSFQB__Generate_Object__c FROM Opportunity where Opportunity.AVSFQB__Generate_Object__c = 'Invoice' |
Step 3 : In the Rules, You will find total of Nine rule and make sure to open the mappings of Rule no 1.
Step 4 : Add the following mapping to the Rule
CustomerAddRq/CustomerAdd/CurrencyRef/FullName | = | IF(VALUE("Account/CurrencyIsoCode").equals("USD"),"US Dollar",IF(VALUE("Account/CurrencyIsoCode").equals("GBP"),"British Pound Sterling",IF(VALUE("Account/CurrencyIsoCode").equals("EUR"),"Euro",IF(VALUE("Account/CurrencyIsoCode").equals("CAD"),"Canadian Dollar","")))) |
Step 5 : Click on Save & Close button to close the mappings screen, After which make sure to Save the workflow to Save the complete workflow.
Now, The products from QuickBooks integrate seamlessly to respective Salesforce opportunity.
...