on 12-27-2018 4:17 PM
Hi,
I have an UDO nammed poligono. I try to add a field doing the following:
POST /UserFieldsMD
{
"Name": "Reparte2",
"Type": "db_Numeric",
"Size": 9,
"Description": "Reparte",
"SubType": "st_None",
"TableName": "@Poligono"
}
That gives me the following error:
{
"error": {
"code": -5002,
"message": {
"lang": "en-us",
"value": "Field size deviates from legal range [1..11] "
}
}
}
So what would be the way to achieve this?
If I remove the line
"Size": 9,
the error does not occur.
If I use db_Float as a type the parameter size gets accepted, I am not sure why this does not work here.
Hi NILS STRITZEL,
Ideally, you should use "EditSize" instead of "Size". The following is mentioned in SDK Help File:
Size: The actual size of the field. The value is automatically determined by the input of the EditSize property.
Do not set any value in the Size property.
EditSize: Sets or returns the field maximum value entered by the user. This applies only when the Type property is set to db_Alpha or db_Numeric.
Following HTTP request works fine at our side:
POST /b1s/v1/UserFieldsMD
{
"Name": "TESTNEW",
"Type": "db_Numeric",
"EditSize": 9,
"Description": "Test Numeric",
"SubType": "st_None",
"TableName": "@MASTERH"
}
Hope it helps!
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.