Hook to add item to transaction

I trying to create a hook that will add an item to the transaction screen but I keep getting errors. My dll is setup properly is being fired as I tested it with a 'Hello World' message box. This is what I have so far: Dim myobject As Object Set myobject = mysession.Transaction.Entries.Add(753, 1, 1, 0, 0, 0, 0)

TIA

John

Reply to
John
Loading thread data ...

After ItemID (753) you must be specify the itemlookupcode, and it's a string.. not integer

Please work with QSRules class

antonio

Reply to
Antonio Mazzeo

I changed the 2nd parameter to a string value but I still get an error.

'you must be specify the itemlookupcode' In the cusomization guide it says 'ItemID - Long value that contains the ID in the database of the item to add to the transaction. If you do not know the ID of the item in the database, set this value to zero and use the ItemLookupCode parameter to identify the item. This parameter overrides the ItemLookupCode parameter.' So this leads me to beleive that I do not have to put any value in the itemlookupcode or if I make the ItemID = 0 then it looks at the itemlookupcode parameter. I have tried both ways with no luck. Still get an error but it is NOW adding the item, after clicking through the error.

John

Reply to
John

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.