2022
Issue : After turning on Multi-currency feature in Salesforce, Product stopped integrating with Salesforce Opportunities.
Description: After turning on Multi-currency in a Salesforce org, it is difficult to get products from QuickBooks to integrate correctly to Opportunities in Salesforce. When we add a new currency to one of our products - in our standard price book in Salesforce - none of the products from QuickBooks will sync over to the Opportunity. It just creates an Opportunity with no products.
Step 1 : Navigate to Workflow listing page of the project for which you wish to make changes by clicking on Project → processes → workflow.
Step 2 : Click on Edit " OpportunityToInvoice ". Replace the reader query from Advanced Query Builder with the following query. Once done, click on Save & Close button.
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 rules. 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 to close the mappings screen. Then, Save the workflow.
Now, products from QuickBooks will integrate seamlessly to respective Salesforce Opportunity.