Hi,
I had a requirement to change a field on a PO during the time of confirmation, however, I had to toggle change management to "No' in order to update the field. I then want to change 'changerequestRequired' back to yes after I update the field, but I am getting an error "Changes to the document are only allowed in state Draft, because change management is activated". This is failing on the second update() line because change management has been set back to yes in the code, but won't update on the SQL table. After the code below, the field changerequestrequired is still set to No, when I desire it to be set to Yes.
Any help is appreciated.
ttsbegin; purchTableSelected.ChangeRequestRequired = NoYes::No; purchTableSelected.CE_ApplyAttachment = NoYes::No; purchTableSelected.update(); ttscommit; ttsbegin; purchTableSelected.selectForUpdate(true); purchTableSelected.ChangeRequestRequired = NoYes::Yes; purchTableSelected.update(); ttscommit; next clicked();