Material group chang even when request is rejected
I am designing a WF where to change the Material Group need approval of supervisor if rejected by supervisor workflow initiator will get a mail for rejection and material group will not be changed.
I designed and linked it to the event the WF is triggering properly but the problem is when supervisor reject the request the WF initiator get a mail but Material group is not set to itu2019s previous value it is getting changed.
Samson lam replied
The workflow is going to be triggered only when you save the changes that you have made to the material group. So to revert the changes when the superior rejects the proposal, You have to create a method in which the the material group is changed to the previous value. For that reason what I feel, get the previous value of the material group from the CDHDR and CDPOS tables and create a background process(a BDC) which updates the material group to the previous value. Use this method in a step in the workflow that you have designed.
Hope this will help you.