2022

Page tree
Skip to end of metadata
Go to start of metadata

Issue:

  • ERROR:(3040) - There was an error when converting the amount "1.339091608E7" in the field "Amount".

Unable to parse the amount value, if amount is populating in Hexadecimal format.

Solution:

  • In order to avoid the above issue, a formula field has to be created in the Salesforce Object (Source Object) and replace it with the existing field in DBSync mappings.

  • Let’s consider the Source Object as Opportunity and follow the below steps to create the Formula field.

* login to your Salesforce account, Go to Setup > Customize > Opportunity >Fields and click on New in Opportunity Custom Fields & Relationships.

* Select Formula on the Next page and click Next. Enter Field Label as ‘QB Total Amount’ And select the “Formula Return Type” as “Text” and then Click Next.

* In The Advanced Formula section, add the formula as “TEXT(Amount)” (here the Amount field would be the Original field which is present in the existing mappings) and then Check Syntax and click Next.

* In the next screen, select field-level security for profiles and click Next. Check Add Field checkbox. Then, check the Page Layouts you want to add it to. Click Save.

Once the Formula field is created in Salesforce, please add the below mapping code to the Amount field in the mapping page for the transaction creation and Update work-rule. Save mappings, save Workflow.




Amount

  =

{

String result=VALUE("QB_TotalAmount__c");

String valueAfterDecimal[] = result.split("\\.");

if(LEN(valueAfterDecimal[1]) >1){

}else{

result=VALUE("QB_TotalAmount__c")+"0";

}

return result;

}

  • No labels