on 2025 Mar 11 1:44 AM
I need to know if it is possible to create records in user-created tables using Service Layer API?
I wanted to avoid connecting directly to the database.
Request clarification before answering.
Hi RicardoTorresDev,
If it is a No Object type table, you can use the following request in Service Layer:
POST b1s/v1/U_MYTBL
{
"Code":"C",
"Name":"CName",
"U_F1":"test data"
}
Where MYTBL is the table name.
Similarly, if the UDO is defined, you can use the following request:
POST b1s/v1/MyOrder
{
"U_CustomerName": "c1",
"U_DocTotal": 620,
"MyOrderLinesCollection": [
{
"U_ItemName": "item1",
"U_Price": 100,
"U_Quantity": 3
},
{
"U_ItemName": "item2",
"U_Price": 80,
"U_Quantity": 4
}
]
}
Where MyOrder is the UDO name.
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.
Thank you, it solved my problem.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 3 | |
| 3 | |
| 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.