Hey @saikrishnav35,
PXChangeID class in PXData that implements an action ChangeCD which does the job behind the scenes.
ChangeID in the CustomerMaint is a class instance of the PXChangeID class. I’m not sure if it is possible to customize modify the ChnageID action in CustomerMaint. Instead you can create a new action in the CustomerMaint, then use the static method ChangeCD available in PXChangeID class.
public PXAction<Customer> changeIDUpdated;
[PXUIField(DisplayName = "Change ID Updated")]
[PXButton(SpecialType = PXSpecialButtonType.ActionsFolder)]
protected IEnumerable ChangeIDUpdated(PXAdapter adapter)
{
string oldCD = "Test37"; // write your existing CD
PXGraph graph = PXGraph.CreateInstance<CustomerMaint>();
PXCache<PX.Objects.AR.Customer> subCache = graph.Caches<PX.Objects.AR.Customer>();
graph.Views.Caches.Add(typeof(PX.Objects.AR.Customer));
subCache.Current = PX.Objects.AR.Customer.UK.Find(graph, oldCD);
PXChangeID<PX.Objects.AR.Customer, PX.Objects.AR.Customer.acctCD>.ChangeCD(subCache, oldCD, "NewID");
subCache.Update(subCache.Current);
graph.Actions.PressSave();
return adapter.Get();
}
In the above example, I’ve created an instance of the CustomerMaint graph and have worked based on it.
You can try something like above during the BigCommerce syn. Hope that helps.! Good Luck,