I am working in the classic UI.
I am working on functions to be triggered when a user clicks the Documents button on the MES > Work Queue > Job Details panel.
When called, the function will delete any current attachments from JobHead that have a DoctypeID of “PRODMOCK” and will then add PRODMOCK attachments from the Sales Order Line to Job before the Documents form opens.
I’ve got the copying part working as expected. I never expected the deleting part to be the problem.
I’ve run the trace multiple times in Job Entry to try to identify the correct steps, but the trace has me stumped. In the UI, I right-click on the attachment in the tree and use the remove option from the context menu. The trace only shows 2 BO methods called. Ice.Proxy.BO.AttachmentImpl > GetPathReferences and Erp.Proxy.BO.JobEntryImpl > Update.
According to the trace, this removal is not being accomplished with a RowMod setting. The the attachment node for the removed attachment is simply removed from the parameter dataset. However, when I remove an attachment in the dataset and call the Update method, I get an error message “Update not allowed, Engineered and Prevent Changes.”
Any suggestions?