Solved

How to create data view of Extension DAC in extension graph?


Userlevel 3
Badge +1

Hi Guys ‘

I am not able to create a data view of extension DAC in Extension Graph

  public PXSelect<SSSLocationExt> Locationtest;

Getting this error  CS0311

 

Thanks

icon

Best answer by Naveen Boga 16 May 2022, 10:42

View original

5 replies

Userlevel 7
Badge +11

Hi @ShahidaValiSyed04 

Do you have any specific reason to create a view with extension DAC? System will not support to create view with extension DAC

Normally We can get the value or assign the value using the GetExtension

Example:

SOOrderExtn orderExtn = Base.Document.Current.GetExtension<SOOrderExtn>();

orderExtn?.UsrField1= “Test”;

string val = orderExtn?.UsrField1;

Userlevel 7
Badge +17

@ShahidaValiSyed04 System will not allow you to create VIEW for the extended DAC and It is NOT required.

You can create a view for the DAC and access the values using GetExtension<> method as indicated by Jini above.

 

Badge

Hi @ShahidaValiSyed04 

Do you have any specific reason to create a view with extension DAC? System will not support to create view with extension DAC

Normally We can get the value or assign the value using the GetExtension

Example:

SOOrderExtn orderExtn = Base.Document.Current.GetExtension<SOOrderExtn>();

orderExtn?.UsrField1= “Test”;

string val = orderExtn?.UsrField1;

Is it possible to get a list that contains the extension data (with our without the base data) or do we have to loop over the list of base data and call GetExtension every time?

Userlevel 3
Badge

Hi @jinin @Naveen Boga , is it possible to Bind the DAC Extension Feild to the View?, Example we need to pull Soline Data to a new grid, and i have added a bool feild UDF to soline, and  only the selected records should be displayed in new grid ,

one Approch is that we need to create a new Dac for the grid and assaign the values to it,but in this case the code becomes lengthy  

second Approch Simply we can bring it by using View, But

 How to Acheive it?

Thanks in Advance

 

Userlevel 7
Badge +17

Hi @Atiq  Yes, we can add the condition in the VIEW with the Extended DAC field.

Here is the Example:

public PXSelect<SOOrder,Where<SOOrderExt.customField,Equal<Required<SOOrder.customField>>».Select(this, custom field value);

 

Based on this view, you will get the records automatically.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved