Hi Sin,
You could use :
[Decimal (5,2)] element dAmt: DecimalValue;
where 5 is the number of digits allowed and 2 is the number of digits allowed after decimal place.
Thanks, Pradeep.
If you have already set the data type as Quantity, you cannot change it if you have deployed the solution to production.
You can use the combination of Numeric.RoundToString and Numeric.ParseFromString functions to round off the value stored in the extension field and convert it back to the type quantity during save.
Hi Pradeep,
Thanks a lot for your response and sorry for my late answer,
Actually we have a custom field that is a type of "Quantity" and we want the decimal value to be shown max 2 number.
But when I add [Decimal (5,2)] to my element, the system gave me an error that
Parameter '[5,2]' of annotation Decimal is expected to be of type 'DecimalValue'.
But my DataType is Quantity, I can not change it,
Do you have any other suggetsion?
Regards
Sin
Add comment