Extentsion table in Acumatica with IsOptional

Hello everybody,

today I want to notice few words about attribute IsOptional. DAC extension can be mapped by inner join, or by left join statement. 

[PXTable(IsOptional = value)] // default is false, or Inner join
public class DACTableExtension : PXCacheExtension<BaseDACTable>
{
 ... 
}

As far as I understand idea behind name, IsOptional means are there additional items from left join. And if set to true, means yes, there are, and if set to false ( default way ) there are not.

The left join way ( IsOptional = true ) can be used for

  • not synched tables
  • creates extension record when record in base table created or updated
  • calculates default field values if no extension table record is found.
  • can be used as separated DAC ( this is shocking for me from viewpoint why to make extension, which can have separated life).

The inner join ( default ) way:

  • always synched
  • extension records automatically created with connection to base record
  • copies key column values to each extension table
  • removes from original db table record when there is not corresponding extension table record
  • can be used as separated DAC ( for me again this was another surprise )

If to summarise, both ways you can use as separeted DAC

No Comments

Add a Comment