We want to add and update Item BOMs (Current Materials) in Cloud Suite Industrial using REST. We are using Current Operations (SLJobRoutes) form to add Work Center to Item and Current Materials (SLJobmatls) form to add Materials to Item. We are getting Error 470 in response. Following are the request payloads which I am using:Request to Add Work Center "GS-Wor" to Item "GS-TEST-1001" using SLJobRoutes IDO:POST https://<...removed...>/IDORequestService/MGRestService.svc/xml/SLJobRoutes/additem HTTP/1.1<?xml version="1.0"?> <IDOUpdateItem xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">http://www.infor.com"> <Action>Insert</Action> <ItemId>PBT=[SLJobRoutes]</ItemId> <ItemNo>0</ItemNo> <Properties> <UpdateProperty> <IsNull>false</IsNull> <Modified>true</Modified> <Name>DerJobItem</Name> <OriginalValue i:nil="true" /> <Value>GS-TEST-1001</Value> </UpdateProperty> <UpdateProperty> <IsNull>false</IsNull> <Modified>true</Modified> <Name>Wc</Name> <OriginalValue i:nil="true" /> <Value>GS-Wor</Value> </UpdateProperty> </Properties> <UpdateLocking>Row</UpdateLocking> </IDOUpdateItem>Response Error: <?xml version="1.0" encoding="UTF-8" ?> <root> <Message>Insert failed. The job entered cannot be null in jobroute_mst. INSERT rolled back.</Message> <MessageCode>470</MessageCode> <UpdatedItems/> </root>Request to Add BOM Material "GS-TEST-1005" to Item "GS-TEST-1001" using SLJobmatls IDO:POST https://<...removed...>/IDORequestService/MGRestService.svc/xml/SLJobmatls/additem HTTP/1.1<?xml version="1.0"?> <IDOUpdateItem xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">http://www.infor.com"> <Action>Insert</Action> <ItemId>PBT=[SLJobmatls]</ItemId> <ItemNo>0</ItemNo> <Properties> <UpdateProperty> <IsNull>false</IsNull> <Modified>true</Modified> <Name>ItmItem</Name> <OriginalValue i:nil="true" /> <Value>GS-TEST-1001</Value> </UpdateProperty> <UpdateProperty> <IsNull>false</IsNull> <Modified>true</Modified> <Name>OperNum</Name> <OriginalValue i:nil="true" /> <Value>10</Value> </UpdateProperty> <UpdateProperty> <IsNull>false</IsNull> <Modified>true</Modified> <Name>Item</Name> <OriginalValue i:nil="true" /> <Value>GS-TEST-1005</Value> </UpdateProperty> </Properties> <UpdateLocking>Row</UpdateLocking> </IDOUpdateItem>Response Error: <?xml version="1.0" encoding="UTF-8" ?> <root> <Message>Insert failed. The job entered cannot be null in jobmatl_mst. INSERT rolled back.</Message> <MessageCode>470</MessageCode> <UpdatedItems/> </root>Any Help about how to fix these errors or to improve these requests? Thank you in Advance!
To insert a record, you have to insert the values of all required fields, especially the primary key fields. You can't insert "Der" (Derived) fields, they are read-only. Review the form and IDO Properties of the SLJobRoutes IDO to determine which fields are required and which are read-only.
Hi Aleena
So the message is correct. All the different types of BOM in Syteline live in the same set of tables and Current BOMs have Job Numbers just like any other type of BOM but that's hidden on the Current Operations and Materials forms.
You'll need to query (LoadIDOCollection) the SLJobs IDO first to get the Job Number and then pass that along with the rest of the data in your UpdateCollection call.
For Current BOMs Type = 'S'. For other BOMs check KB 1637734.
Rees
In which attribute, we have to pass value of that Job number then? Do you have sample request payloads for these calls?
You'll need to check the SLJobs IDO but most likely the property name is JobNum
Do we need to create Job for that Item first using SLJobs and then use that Job Number to pass to SLJobRoute?