Quantcast
Channel: Sage 100
Viewing all articles
Browse latest Browse all 37010

Forum Post: PO_GeneratePurchaseOrders does not work

$
0
0
PO_GeneratePurchaseOrders  does not work.   When i manually enter a drop ship sales order and click the generate purchase order on the sales order screen everything works.   With the same data on a different so the below program doesn't work.     Dim oScript As Object     Dim sess As Object     Dim r As Object     Dim oSEC As Object     Dim o As Object     Dim sOrdersCreated, apo As String     Sub Main()         'Create ProvideX COM Object         oScript = CreateObject("ProvideX.Script")         oScript.Init("myvalidpath")         'The Session object must be the first MAS 90 object created         sess = oScript.NewObject("SY_Session")         r = sess.nLogon()         If r = 0 Then             ' Please remember to correct the username, password             r = sess.nSetUser("myvaliduserid", "myvalidpassword")         End If         ' Set the company, module date and module for the Session         r = sess.nsetcompany("myvalidcompany")         r = sess.nSetDate("P/O", "20140625")         r = sess.nSetModule("P/O")         r = oSEC = sess.nSetProgram(sess.nLookupTask("PO_GeneratePurchaseOrders_ui"))         o = oScript.NewObject("PO_GeneratePurchaseOrders", sess)         apo = "0137175"   ' this is a valid SO with correct data to create a PO from dropshop and vendor are set         sOrdersCreated = ""         r = o.nCreateOrders(apo, sOrdersCreated)         r = o.DropObject()         o = 0         MsgBox(sOrdersCreated)     End Sub Please help Thanks

Viewing all articles
Browse latest Browse all 37010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>