Can anyone help me to correct the script below? I want to make the IDM attachment mandatory.
long nr.of.documents
nr.of.documents = dom.idm.list.documents.by.attributes("MDS_EntityType","ShipmentRef","MDS_AccountingEntity", "infor.ln.5100","Shipment_Reference",txinh200.orno)
if nr.of.documents = 0 then
message("No Attachment found. Please upload and proceed")
endif
Below is the JSON script from Context Viewer
{
"screenId": "ln_txinh2130m000",
"supportProductId": 116653,
"logicalId": "lid://infor.ln.ln01/5100",
"entities": [
{
"visible": false,
"readonly": true,
"entityType": "company",
"id1": 5100
},
{
"accountingEntity": "infor.ln.5100",
"visible": true,
"readonly": false,
"entityType": "txinh200",
"id1": "SRF000004",
"drillbackURL": "?LogicalId=lid://infor.ln.ln01/5100&ICMDrillback=true&Session=txinh2130m000&SessionIndex=1&Filter=U1JGMDAwMDA0&Enc=1&Mode=64",
"lnTable": "txinh200"
}
],
"contextId": "032025111226_82748_21"
}