Wednesday, 23 September 2020

QCP - Quote Calculator Plugin Exp

Intermittent below error,Let's see the root cause & Fix

Calculation error on quote Q-011232: Error parsing quote: Unexpected token [ in JSON at position 117555 

Root Cause : Asynchronous promise method is not returning,return statement was missing in nested method calling.

Fix : Implement correctly the promise chain ,Add the missing return statements,If not returned it will take as undefined and you will get above mentioned defect.

Please refer below QCP GuideLines,Records,Promise Chaining

Observation issue occurs only in Calculate Quote button not in the QLE(Quote Line Editor) Calculate button,Even though from both the places same QCP code executes.Why?

Thanks to Salesforce Support Team for below details.

The Calculate button on the record and within the Quote Line Editor does call the same javascript but it does it in different ways. 

When performing a Quote calculation from within the Quote Line Editor the calculation is performed client side, within the web browser, 

via javascript. 

When the calculation is performed outside of the Quote Line Editor the calculation is enqueues an asynchronous 

apex job and the javascript and the calculations take place on the Heroku server. 

Steps to set the QCP 

Login To Salesforce --> Set Up --> Installed Packages --> Salesforce CPQ --> 
Configure -->Plugins [Settings Editor Salesforce CPQ ] -->
 Enter the details in Quote Calculator Plugin

Note : Legacy Quote Calculator Plugin is for Apex ,Now a days using the javascript file only for better performance



To see the javascript file

Tabs --> Custom Scripts --> To see the javascript file & Edit the file /Clone to newer Version

When QCP is required?

Using QCP the business logic can be written in Apex / Javascript,More flexibility,This comes in rescue when you have complicated product bundling / complex pricing logics.

Refer more on QCP

Thursday, 10 September 2020

LWC Framework Is Open Source

Yes,Salesforce announced open sourcing of the Lightning Web Components framework,Refer

As shown below,Lightning Web Components framework doesn’t have

dependencies on the Salesforce platform. Instead, Salesforce-specific services

are built on top of the framework.What that layered architecture means

is that you can now use the Lightning Web Components framework to

build web apps that run anywhere.

Differences Between Building Lightning Web Components on Lightning Platform and Open Source ?

In short, for faster development and to avail other benefits LWC on the Salesforce Lightning Platform is the best choice.Refer


LWC on lightning & Open Source feature comparison