Changing Invoice addresses in closed period
I was asked to allow Administrators, via scripting, the ability to make address changes on Invoices after a posting period has closed because re-opening a period to make a simple edit is cumbersome. Is this possible?
For example, when I edit an invoice in a closed period, I follow these steps in the U.I.:
1) In Admin role, I edit an Invoice in a closed period.
2) I get a popup reading "The transaction is currently in a period that has been closed. Are you sure you want to continue?" I click OK to proceed.
3) I go to the Address tab and change the address of either the Billing Address or Shipping Address fields. I do so using the drop-downs above the address fields.
4) When I select alternate addresses, the the Billing/Shipping addresses change values as expected.
5) I then save the record.
After the save, both addresses revert back to the original ones with no warnings, errors, or indication at all. I can change other fields on the screen and they save OK.
Also, I wrote a simple user event script that sets the "billaddresslist" field to the internal ID of an address on the related Customer record. In BeforeSubmit(), I'd query the field before and after I set it and the value changes. But, after submitting the record, and in the AfterSubmit() function, I reload the record and log the "billaddresslist" and "shipaddresslist" fields and they reverted to the original values.
Am I attempting something not possible? Can I do a workaround?