I am working on a screen customization that will launch the JobEntry form from itself in a different site (user is in FIELD1 and job is located in MFG) using the code below.
var session = (Ice.Core.Session)oTrans.Session; var oldplant = session.PlantID; //plantid="FIELD1" session.PlantID = "MFG"; //plant I want to open the form in LaunchFormOptions launchObject = new LaunchFormOptions(); launchObject.IsModal = false; launchObject.SuppressFormSearch = true; launchObject.ValueIn = newJobNum; ProcessCaller.LaunchForm(oTrans, "PJGO1010", launchObject); session.PlantID = oldplant; //reset session back to original
I’m encountering two issues:
A warning message "Attempting to launch Erp.UI.JobEntry from itself is not logical. Do you want to launch a new instance?
More importantly, after answering Yes, the form opens and the status bar shows me it’s been opened in the MFG site but the job is not there. When searching for jobs from the secondary form, it appears it is still in the FIELD1 site.
The reason we want to do this is that we repair elevators through our field office (FIELD1) and frequently need materials manufactured from our manufacturing facility (MFG). The person entering the job information is creating the main field job and I am automating the generation of the manufactured job in the other site. It would be great if I can also pop up the form of the manufactured job for them to allow them to enter the materials on the other screen.
I have read in other posts against tampering with the session object but it will really make our data entry person’s lives much easier. Site security is not an issue in this instance because all of our users have access to the MFG site. Any help would be greatly appreciated!