Bill of Materials InvokeProgram Script

SOLVED

I am trying to launch either BOM Inquiry or Maintenance using an InvokeProgram or Process User Defined Script, but any time I add the Bill I get the error "You do not have security rights to create the record" but I am not trying to create a record. Any ideas? I have tried every combination of BillNo and Revision I could think of.

retVal = oSession.InvokeProgram("BM_BillInquiry_ui","2480-8-50000")

retVal = oSession.InvokeProgram("BM_BillInquiry_ui","2480-8-50.000")

retVal = oSession.InvokeProgram("BM_BillInquiry_ui","2480-8-50"+"000")

Parents Reply
  • +1 in reply to jepritch
    verified answer

    You were on the right track, big help thank you.

    This ended up working

    sItem = SO_SalesOrderDetail_bus_ItemCode
    sRevision = SO_SalesOrderDetail_bus_Revision

    set oBMUI = oSession.AsObject(oSession.GetObject("BM_BillInquiry_ui"))
    sMsg = sItem & String(30-len(sItem),&H00&) & "000"
    retVal = oBMUI.process(sMsg)

Children