cancel
Showing results for 
Search instead for 
Did you mean: 

There is a problem updating the Standard Quote Item Custom Field.

vrjadhav
Participant
0 Kudos

Hello,

Below are two item custom fields:
1) ExtendedAmount : This is a standard item custom field.

2) Margin: This item custom field was created for business purposes.

The value of the ExtendedAmount item custom field must be changed to match the value of the Margin item custom field. To get this capability, I have created a custom quote calculation script, but it did not work. Below you will find the script code.

Item.ExtendedAmount.Value = float(Item.Margin.Value)

It is working with other standard fields. Below you will find the script code.

Item.ListPrice = float(Item.Margin.Value)

Please help me with this issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi vrjadhav

It should be

Item.ExtendedAmount = float(Item.ListPrice)

Just remove (.Value)

Once it works, please accept and close this question

vrjadhav
Participant
0 Kudos

Hello yoganandamuthaiah ,

Yes, I tried that but had no luck. Please find below screenshot for your reference.

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you show the result from workbench ?

vrjadhav
Participant
0 Kudos

Hello yoganandamuthaiah ,

I tried to run the below code from the script workbench. Now I can see the value has been updated and I can see it in the workbench log but not on the Quote UI. I refreshed the Quote page but still no luck.

Script Workbench:


Quote UI:

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Just refresh the page, you will see RS.345.35 in Extended amount column in quote page after you ran in scriptworkbench

vrjadhav
Participant
0 Kudos

Hello yoganandamuthaiah ,

I tried refreshing the quote page twice to check if the adjustments had been made, but no luck.. We need to achieve this behavior from a custom calculation script. I am not sure why it works for other item custom fields but not with ExtendedAmount. Could you please help me in this case ?

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Not sure Vaibhav why you can't see when you refresh the page. Can you check your general parameters setting once ?

I can able to see the value in my CPQ Domain after script workbench execution.

vrjadhav
Participant
0 Kudos

Greetings, yoganandamuthaiah

Okay, Could you please tell me which parameters in the general parameter settings need to be changed?

vrjadhav
Participant
0 Kudos

Hello yoganandamuthaiah ,

Please let me know which parameters in the general parameter settings need to be modified. As a result, we can put an end to this question.