I know this is “not possible”. However, Acumatica can do it. Why can’t I?
When creating the Sales Demo data starting in 21R2 or so, someone extended AACUSTOMER to a Vendor, then deleted that vendor account. This returned AACUSTOMER back to just a CU. However, it leaves a record in the Vendor table with DeletedDatabaseRecord = 1.
I want to programmatically “re-extend” the customer to a vendor again. I can’t. If I try to insert a new record in the Vendor table, it sees it as a duplicate. Also, since it is deleted, I can’t edit the existing “deleted” record.
Acumatica has some way to do this. If you use Acumatica to Extend to Vendor for AACUSTOMER, it either 1) permanently deletes the existing vendor record prior to inserting the new record, or 2) it changes the flag on the deleted field to zero. I am guessing it has some way to change the flag.
I thought I could try to re-use the business logic to extend the customer to a vendor using the CustMaintenance graph, but that will throw a redirect to the Vendor graph. My program is a process and cannot deal with user interactions.
Any ideas on how to change the flag on the deleted Vendor (or Customer) record? What is Acumatica’s secret?
Best answer by darylbowman
View original