Hi @stephenward03,
SOOrderCustomerCredit
is inherited from SOOrderCustomerCreditExtension
SOOrderCustomerCreditExtension
is inherited from CustomerCreditExtension
CustomerCreditExtension
is inherited from PXGraphExtension
.
So, when SOOrderCustomerCredit
is inherited from SOOrderCustomerCreditExtension<SOOrderEntry>
, then it also inherited form a PXGraphExtension<SOOrderdenEntry>
, and it creates the link between the two classes.
Long story short: SOOrderCustomerCredit
is a graph extension of SOOrderEntry
.
Thank you for responding, Very well explained and well formatted - I think I need to start using inline formatting too!
Following on from your answer that the SOOrderCustomerCredit
is basically a graph extension of SOOrderEntry
, I guess it’s the events defined in the extension which are actually triggering the credit checks.
The concern I have is that by looking through the code on SOOrderEntry
there is no reference to SOOrderCustomerCredit
so it’s quite difficult to know how credit checks are performed. For all I know there could be (and probably are) many other graph extensions which I’m not able to know about just from looking though graph code.
Do you know if there are any tools (in VS or Acuminator) which can assist in mapping out the class structures in Acumatica?
I don’t know if there is any tool for this, but you can use this small extension to write them to the trace.
using System;
using System.Collections;
using System.Collections.Generic;
using PX.Api;
using PX.Data;
using PX.Objects.SO;
namespace PX.Objects.ShowExtensions
{
// Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
public class ShowExtensions : PXGraphExtension<SOOrderEntry>
{
public PXAction<SOOrder> WriteExtensionsToTrace;
PXButton]
PXUIField(DisplayName = "Write Extensions To Trace")]
public virtual IEnumerable writeExtensionsToTrace(PXAdapter adapter)
{
var list = new List<string>();
try
{
for (var i = 0; i < int.MaxValue; i++)
{
list.Add(Base.GetExtension(i).GetType().FullName);
}
}
catch (Exception e)
{
PXTrace.WriteInformation(list.JoinToString("\r\n"));
}
return adapter.Get();
}
}
}