Skip to main content
Question

Get value each column in tab "DETAILS" screen Bills and Adjustments(AP301000)

  • March 21, 2023
  • 6 replies
  • 198 views

Forum|alt.badge.img

Hello expert.

How cant I get data field in the “details” tab screen AP301000 below image? How can i fetch data each row? Thank you so much.

 

6 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • March 21, 2023

AP Details DAC is APTran not APInvoice.Your “row” variable is declared as APInvoice.


Forum|alt.badge.img
  • Author
  • Freshman II
  • March 22, 2023

@aaghaei Thank you for your ideal, but it not work. We can’t cast.

 


aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • March 22, 2023

Pal it is not IDEA. This is how you MUST do it. You can not query and use a field that does not exist in a DAC. The SubID is in APTran not APRegister (APInvoice)


By looking at your topics, with all due respect, I highly doubt you should be performing code based customizations. for example, you should not manipulating data in RowSelected event at all. 
 

in your current thread, if you want to access the current APTran line and manipulate, you can use

Base.Details.Current.SubID = “your new value”; 

Base.Details.Update(Base.Details.Current);

but I am not really confident about what you are doing and how it might create unintended consequences.

 

 


aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • March 22, 2023

Edit: Depending on your version the View Name might be different. I just checked in 2022R2 and I see the APTran view names depending on your need are “Transactions”, “AllTransactions” or “TransactionsPOLine”.

So you will be updating your current AP Details Line in one of the above Views as Base.Transactions.Current.SubID = “new value”; but not definitely in RowSelected Event.

If you want to manipulate a given record using EventHandlers, for your purpose you MUST work on “APTran” DAC EventHandlers in your graph extension depending on the situation. i.e. Row updated event will be something like 

protected void _(Events.RowUpdated<APTran> e)
{
APTran row = e.Row;
row.SubID = YourValue;
}

 


Forum|alt.badge.img
  • Author
  • Freshman II
  • March 22, 2023

@aaghaei Yes, after your commit “for example, you should not manipulating data in RowSelected event at all. “  now I try RowUpdated. Thank you. I doing query data (in SQL Server Management Studio) tab “details” but not found name some table in tab. Can you help me this case?

 

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • May 17, 2023

Hi @thanhaim were you able to find a solution? Thank you!