Hook at print time. Hook #1

I have a hook running a print time. The problem I am having is my hook needs to have the transaction saved first before the hook runs and the only time I can see that happening before printing is the before print hook #1. The problem I am having is the hook is supposed to update the transaction just updated and then print and the XML receipt file is supposed to use some of the information just saved. It seems that even though this hook is supposed to be before print time that it is actually formulating the XML file and getting the receipt ready before the hook is ran.

Does anyone know exactly how this hook works (the hook #1) ? The actual process flow like is the XML receipt file actually getting started before the hook runs, even thought the hook is supposed to be before any printing starts? Ideas?

Thanks, Nick

Reply to
ClothingStore
Loading thread data ...

Reply to
ClothingStore

Are you updating the transaction by writing to the database directly, or are you setting properties in the Session object as well? The Receipt is being printed from information in the Session, not the database.

Reply to
Glenn Adams [MVP - Retail Mgmt]

Reply to
ClothingStore

There are 10 Session Variables that you can use to store your information. These are accessible to the Receipt engine.

In your add-in: mySession.Variable(1) = "My String Value"

In your Receipt Template "My Label: |" Session.Variable1

Also, if you are changing existing values rather than inserting values that do not otherwise exist in RMS, you can change the values in the properties of the Session object. These changes should persist to the receipt. Really, this would be the preferred method for getting values into the database - you should only write directly to the database during a transaction if you are adding extended fields.

Hope that helps...

Reply to
Glenn Adams [MVP - Retail Mgmt]

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.