Can easily get into trouble but doable…
EDIT: This does not achieve what you are trying to do but is a way to change plant within BPM and not in the session the way I think you are hoping for
using (CallContext.Current.TemporarySessionCreator.SetPlantID("UH-OH Different Plant").Create())
{
}
In actual fact that’s a feature that would be nice to have a in a few other areas. One that springs to mind in PO’s we have one team that creates import POs for the whole company and changing the site on the PO does not automatically make the PO receivable in the correct site. So unless we are just using things incorrectly. I guess the thing is you could tie the code to the site button click on the PO.
I am looking to make an “Easy Button” in the main MES customization to change the site so the current user doesn’t have to log out, change the site and log back in.