PF
12/16/2024, 7:20 PMCeligo AI
12/16/2024, 7:20 PMAI generated answer (using internal Slack threads):Yes, it is possible to set a ratehighprecision field type with a percentage through the SOAP API. However, you might need to handle the value as a string and use the
setText
method instead of setValue
. This is because the setValue
method might interpret the percentage as a decimal, causing unexpected results.
Here is a sample code snippet:
javascript
record.setText({
fieldId: 'rate',
value: '20%' // your percentage value
});
Also, if you are dealing with a situation where the rate is being multiplied by the quantity, you might need to divide the amount by the quantity before setting the rate. Consider using a library like bignumber
for precision in division calculations.
If you need to set a rate with more than 2 decimal places, you would need to apply custom logic via script or potentially workflow to round or truncate as needed.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
12/16/2024, 7:20 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.863876283
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.807333469
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.802617133
Celigo AI
12/16/2024, 7:20 PM