Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Contributor
momiebear
Posts: 22
Registered: 03-10-2009
0

BOI CREATE NEW INVENTORY ITEM

Has anyone written a Boi Routine for creating new inventory items mas 4.4.  Can you help us get started?

Switcher
BigLouie
Posts: 2,682
Registered: 10-28-2008
0

Re: BOI CREATE NEW INVENTORY ITEM

I bet Dawn has. She has used VB Scripting and BOI to do everything from slow global warming to halt the destruction of the Great Barrier Reef.

Big Louie No MBA but BMOC
--------------------------------------------------------------------------
You have enemies? Good. That means you've stood up for something in your life.
Super Contributor
DFeller
Posts: 2,942
Registered: 10-28-2008
0

Re: BOI CREATE NEW INVENTORY ITEM

Oh, BigLouie, you exaggerate.  However I have been working on using Visual Integrator to import more hours into the day so perhaps I can accomplish those things after all.  :smileyvery-happy:

 

Dawn

unidentified user
tdavila
Posts: 3
Registered: 03-09-2011
0

Re: BOI CREATE NEW INVENTORY ITEM

Actually I called her company trying to get a hold of her.  She has helped me out before on the forums.I am still waiting feed back.  We have got to the point where we can write the item code and the product line but it will not let us set the value for the item description or the primary vendor.  Please help!

Dim strItemCode As String = "TES-1234597"
        retVal = soORDER.nSetKey(strItemCode)
        Dim strLastError As String = ""
        strLastError = soORDER.sLastErrorMsg
        rtn = soORDER.nSetValue("ProductLine$", "0002")
        strLastError = soORDER.sLastErrorMsg
        rtn = soORDER.nwrite()
  strLastError = soORDER.sLastErrorMsg
        rtn = soORDER.nSetValue("ItemCodeDesc$", strDesc) <---throws error The record is not in an editable state.

Regular Contributor
Gator
Posts: 269
Registered: 12-05-2008
0

Re: BOI CREATE NEW INVENTORY ITEM

Put the ItemCodeDesc SetValue before the Write line.

 

In order to assign the primary vendor you first have to save the item, then add a record to the ItemVendor table, then come back to the item and assign the primary vendor (or else the validation will fail).

unidentified user
tdavila
Posts: 3
Registered: 03-09-2011
0

Re: BOI CREATE NEW INVENTORY ITEM

Thanks for the heads up.  We did get the item code description to fill in by moving it up in the  script prior to the produc t line.  I will post our results

unidentified user
tdavila
Posts: 3
Registered: 03-09-2011
0

Re: BOI CREATE NEW INVENTORY ITEM

 Dim rtnIV As Object
        rtnIV = oSS.nsetdate("I/M", strDate)
        oSS.nSetModule("I/M")
        oSS.nSetProgram(oSS.nLookupTask("IM_ItemVendor_ui"))
        Dim objIV As Object
        objIV = oPVX.NewObject("IM_ItemVendor_bus", oSS)

 

Errors at the last line. 

Regular Contributor
Gator
Posts: 269
Registered: 12-05-2008
0

Re: BOI CREATE NEW INVENTORY ITEM

[ Edited ]

I believe "Set " is missing from your last line.

 

Set objIV = oPVX.NewObject("IM_ItemVendor_bus", oSS)