View Single Post
  #3 (permalink)  
Old January 21st, 2008, 15:47
jlgottlieb jlgottlieb is offline
Junior Member
 
Join Date: Aug 2007
Posts: 6
Thanks: 3
Thanked 1 Time in 1 Post
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 0
jlgottlieb is on a distinguished road
Re: Agents-refnumber From Order Release To Shipment

Kihsore,

We also copy refnums from the order release to the shipment, but we do this from a shipment agent, rather than an order release agent.

The agent event is: SHIPMENT - CREATED.

Athe action is: COPY REFNUMS TO SHIPMENT.
The associated object is SHIPMENT TO ORDER RELEASE

So when we copy the BULLETIN_NBR from the order release to the shipment, it looks like this in the agent:

COPY REFNUMS TO SHIPMENT: SHIPMENT TO OREDER RELEASE, BULLETIN_NBR, BULLETIN_NBR.

Note: That if you have more than 1 order release on the shipment it attempts to copy the refnum for each order release. If it is a duplicate, you will see an exception in the log, but it WILL NOT stop the agent from running. Also if you have multiple of the requested refnum, or different values for the refnum from different order releases, you will get mutiple refunums on the shipment.

We now have so many refnums that we copy from location and order release, that I am now working on calling a stored procedure to do the copy rather than using the agent action to do so. I am doing this for 2 reasons: 1) to avoid all the duplicate key exceptions in the logs. 2) we have some refnums where instead of adding multiples of the same refnums, the user wants 1 refnum with the values concatenated and delimeted by commas on the shipment. Also because our agent is quite large and there is a 99 line limit, so by doing all the copies in the stored procedure, I can make the agent smaller and allow for other logic.

I hope this helps.

Janice
Reply With Quote
The Following User Says Thank You to jlgottlieb For This Useful Post:
krishna.kk (January 22nd, 2008)