Author Topic: BOI ACL  (Read 897 times)

0 Members and 1 Guest are viewing this topic.

John Spikowski

  • Posts: 36
BOI ACL
« on: January 30, 2018, 04:28:23 PM »
The following is an example of the Sage 100 BOI API instantiating a ACL AR_Customer lookup.

Code: Script BASIC
  1. ' BOI - ACL AR_Customer
  2.  
  3. IMPORT BOI.sbi
  4.  
  5. oscript = BOI::CREATE(:SET, "ProvideX.Script")
  6. BOI::CBN oScript, "Init", :CALL, "C:\\Sage\\Sage 100 Standard\\MAS90\\Home"
  7. osession = BOI::CBN(oscript, "NewObject", :SET, "SY_Session")
  8. BOI::CBN osession, "nSetUser", :CALL, "JRS", "MyPassword"
  9. BOI::CBN osession, "nsetcompany", :CALL, "ABC"
  10. BOI::CBN osession, "nSetModule", :CALL, "A/R"
  11. mdate = BOI::CBN(osession, "sModuleDate", :GET)
  12. BOI::CBN osession, "nSetDate", :CALL, "A/R", mdate
  13. BOI::CBN(osession, "nSetProgram", :CALL, BOI::CBN(osession, "nLookupTask", :CALL, "AR_Customer_ui"))
  14. ocust = BOI::CBN(oscript, "NewObject", :SET, "AR_Customer_bus", osession)
  15. oui = BOI::CBN(oscript, "NewObject", :SET, "AR_Customer_ui", osession)
  16. BOI::CBN(oui, "nInvokeLookup", :CALL, "AR_Customer", retval)
  17.  
  18. PRINT retval,"\n"
  19.  
  20. BOI::CBN ocust, "DropObject"
  21. BOI::CBN osession, "DropObject"
  22. BOI::RELEASE oscript
  23.  


C:\ScriptBASIC\BOI>scriba acltest.sb
01SAGE
C:\ScriptBASIC\BOI>