Printing PickList from one plant, to another plant

Hello all,

I have made a Dashboard used by CS rep to see all open orders currently in the system. They have a view of both of our plants. I have added the Context menu on OrderNum to print the pickList for orders to be shipped today or the next day. This menu calls a customization of the PickListPrint Form, where I set all the necessary fields and launch a pdf preview, then close the form, so the user oinly sees the generated pdf…see this link Add SO Pick List to OrderHed.OrderNum context menu? - #2 by Hogardy

The issue I have is if I am in Plant A, the report will work for orders from plant A only.
If I need to print for plant B, The user needs to change its current plant, and launch the Dashboard again. Not really efficient…but they have been using it for the past 3 years.

Now we just bought a company which will add 6 new plants to deal with…

My question is:
How can I change the way I call the SOPick List report module in order to make it think it is launched from a specific plant so it’s logic will continue as designed ?
For instance, if the order is from plant B, only print SOPicklist from plant B… etc…

Would it need a new login in code ? using the specific plant, launch the module and then kill the connection when I close the form?

Thank you all for any input on this…


Hi Pierre,

Can you pass the PlantID into the form as well? If you can then use something like:

using (CallContext.Current.TemporarySessionCreator.SetPlantID("PassedInPlant").Create()) 
   Do Something ;

Hope this helps



Thanks I will try that…instead of my original idea of opening a new session temporarely…
Will let you know!