POST can used for POST and PUT
If item Version not existing, the the system create it
If item Version is existing, it make an update
Note:
if you've more then one Item Version, you must define this Version by Version
It's not possible to define all Versions while creation of the item self. First you must define the item and then the related item versions.
The ItemVersionStatus must be defined before.
All fields from itemVersion changeable (not ItemCode,IVersionId)
Changes saved in activity log from item version
Note: If Status not defined, system use the first statusId from status definition table
Return value
The system return error informations or the created / updated itemcode
Error Example:
{ "error": {
"code": 400,
"message": {
"lang": "en-us",
"value": "unknown property dradwingnumber"
}
}
}
OK - Example
{
"value":"0006", // the ItemVersion
"transaction":"update" // or create
}
Update / Create process
Error case: In JBScript it call an error, if process not working.
OK: Return returnResult as object with value "value" and "transaction"
#jbs
try {
let r=bsl.post ("ItemVersion",{"ItemCode":"FPS_B_O_V","IVersionId":"0006",
"Description":"Finished Product (with semi finished) / Batch / Make To Order / Version Control - release","DrawingNumber":"123433244","status":"release"});
}
catch (r)
{alert(r.message)}
finally
{alert(r.returnResult)}