Some properties of graph in Acumatica

Hello everybody,

today I want to mention few interesting properties of Graph in Acumatica:

  1. IsImport
  2. IsExport
  3. IsMobile

Names are pretty self-explanatory, but let's go a bit deeper.


Imagine following situation: you created some code in graph, and have huge desire to add some logic, which will be executed only when it is used in Import mode. For example in case of import you'd like not to add discount. How to tell this to Acumatica? For example like this:

if (!sender.Graph.IsImport) AddDiscount(sender, doc);

This will tell to Acumatica not to add discount to your entity during Import.


Another use case. Imagine, that you want some logic to be executed during Export process. How to track it? For example like this:

if (!this.IsExport) AddAdditionalInfo(sender, doc);


This property will be set to true if Acumatica is executed from mobile device. Imagine that you need to override old details only on mobile devices. For such a purpose you can use following code fragment:

    if (cache.Graph.IsMobile) // if inserting from mobile - override old detail
             insertNewTaxTran = false;


As you can see, Acumatica is pretty flexible system, and with those three fields which belong to each graph, you have even more flexibility

No Comments

Add a Comment