Skip to main content
Answer

Smart panel on detail lines not working

  • October 2, 2024
  • 10 replies
  • 180 views

I am creating a customization on the sales order screen to collect some info on a smart panel and add it to custom fields on the line details. This is a low code project so I created the smart panel using the UI. I dropped a button on the action bar for the details grid. On the PopupPanel property of the button, I pointed it to the smartpanel by adding the ID there. 

 

This all works great. When the button is clicked, the popup panel comes up. The only issue I am facing is that the information entered is always saved to only the first line on the details grid. It does not matter which line I have selected before clicking the button to open the popup panel. What am I missing?

I am on Acumatica 2023 R2. 

Best answer by darylbowman

Dialogs can be very challenging / time consuming, but here are the basics:

  1. Create a graph extension of SOOrderEntry
  2. Write a new DAC with the custom fields you wish to update
  3. Write a new PXFilter view of your new DAC type
  4. Bind your existing dialog to this new data view
  5. Write a new action to call YourNewView.AskExt() to pop the dialog, receive the dialog result, and assign the values you entered to the currently selected SOLine (Base.Transactions.Current)

10 replies

darylbowman
Captain II
Forum|alt.badge.img+15

I understand this is low-code, but I’m assuming you must have some code. If so, could you post it?


  • Freshman I
  • October 2, 2024

Is “SyncPosition”set to true on the grid?


  • Author
  • Freshman I
  • October 2, 2024

Is “SyncPosition”set to true on the grid?

Yes. That is by default since there are other panels that do the same out of the box.

 


  • Author
  • Freshman I
  • October 2, 2024

I understand this is low-code, but I’m assuming you must have some code. If so, could you post it?

Up to this point, there is no code other than declaring the custom fields for the SOLine table.


darylbowman
Captain II
Forum|alt.badge.img+15

What data view is the panel bound to?


  • Author
  • Freshman I
  • October 3, 2024

What data view is the panel bound to?

Sales Order Line

 

 


darylbowman
Captain II
Forum|alt.badge.img+15

I was looking for the name of the data view in the Data Member field of the form element or wherever you specified it. I’m guessing it’s Transactions because I don’t see any other line views. Since nothing is explicitly telling it which line you’re trying to update, I’m guess it’s just picking the first one.

I don’t think you’ll be able to make this work without some code.


  • Author
  • Freshman I
  • October 7, 2024

I was looking for the name of the data view in the Data Member field of the form element or wherever you specified it. I’m guessing it’s Transactions because I don’t see any other line views. Since nothing is explicitly telling it which line you’re trying to update, I’m guess it’s just picking the first one.

I don’t think you’ll be able to make this work without some code.

Thanks! Any pointers on how to go about writing this code? I can write code, just not familiar with the framework.


darylbowman
Captain II
Forum|alt.badge.img+15
  • Answer
  • October 7, 2024

Dialogs can be very challenging / time consuming, but here are the basics:

  1. Create a graph extension of SOOrderEntry
  2. Write a new DAC with the custom fields you wish to update
  3. Write a new PXFilter view of your new DAC type
  4. Bind your existing dialog to this new data view
  5. Write a new action to call YourNewView.AskExt() to pop the dialog, receive the dialog result, and assign the values you entered to the currently selected SOLine (Base.Transactions.Current)

  • Author
  • Freshman I
  • October 8, 2024

 

Dialogs can be very challenging / time consuming, but here are the basics:

  1. Create a graph extension of SOOrderEntry
  2. Write a new DAC with the custom fields you wish to update
  3. Write a new PXFilter view of your new DAC type
  4. Bind your existing dialog to this new data view
  5. Write a new action to call YourNewView.AskExt() to pop the dialog, receive the dialog result, and assign the values you entered to the currently selected SOLine (Base.Transactions.Current)

Thanks! I was going a different route of creating the new fields on the existing SOLine table and then binding the smart panel to the existing SOLine datasource. In my head, that should have worked. I’ll try your way for now but I will keep on trying to figure out if there is a way to make it work the way I had it.