Continuing the discussion from Auto Generated Sales Order Release Default:
Ideally we really wanted to use consolidated purchasing, but it only really appear to work correctly in a multi-company configuration, not multi-site. (i.e head office purchasing for all sites, without having to change site, and sites being able to purchase themselves)
My issue was a bit different to @jgehling. Firstly trying update the release on PO, not the sales order, and the releases were already created.
I ended up going with a preprocessing BPM on the PO Update to trigger the change and that change only occurs when the Site button used and the name ShipName Changed.
Caveat, using this method the user has to manually refresh the form, but for the purpose of training users I’ve added a message to remind them to refresh.
There is ChangeRelPlant plant method that is fired when you update a Releases Plant, so perhaps it is possible to call that method from code passing in the relevant parameters/dataset.
<tracePacket>
<businessObject>Erp.Proxy.BO.POImpl</businessObject>
<methodName>ChangeRelPlant</methodName>
<appServerUri>net.tcp://ttaseapptest01/EpicorERPTest/</appServerUri>
<returnType>System.Void</returnType>
<localTime>1/04/2019 13:18:43:6272892 PM</localTime>
<threadID>1</threadID>
<executionTime total="66" roundTrip="40" channel="0" bpm="0" other="26" />
<retries>0</retries>
<parameters>
<parameter name="newPlant" type="System.String"><![CDATA[70]]></parameter>
<parameter name="ds" type="Erp.BO.PODataSet">
<PODataSet xmlns="http://www.epicor.com/Ice/300/BO/PO/PO" />
</parameter>
</parameters>
<paramDataSetChanges>
<paramDataSet name="ds" useDataSetNbr="0">
<changedValue tableName="PORel" rowState="Modified" rowNum="0" colName="RowMod"><![CDATA[U]]></changedValue>
</paramDataSet>
</paramDataSetChanges>
</tracePacket>
Another interesting tidbit is the fact that the ChangeCountry method is fired after you have returned from the search that was invoked from the site button click.
Written on 10.1.600. More then happy to hear of better ways.
POReleaseLineUpdateOnSiteChange.bpm (71.8 KB)
I’ll more than likely have to create a second BPM on the releasegetnew or similar to take into account when the user creates a new PO, then changes the sites and then adds the lines, so that might be simlilar to @jgehling s problem.