Skip to main content
Answer

Want to add a popup window in my customized screen when click the button

  • February 6, 2023
  • 2 replies
  • 1161 views

Forum|alt.badge.img

Hi,

I need to add button ‘Add Order’ in the details tab like below screen shot.

When the clicking button I need to load purchase order details( popup window) Relevant with selected customer.

Like the below one.

 

Can you help to how i do it.

Thanks & Regards

Best answer by sweta68

Hi Jeewani,

As per the Aaghaei, you need graph extension, smart panel and callback command for placing the Add order button. You can refer below piece of code that we had used for similar task for one of our client. It may shed some light...

Action for the graph extension..

  public PXAction<MyDac > addOrder;

        [PXUIField(DisplayName = "Add Order", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]

        [PXLookupButton]

        public virtual IEnumerable AddOrder(PXAdapter adapter)

        {

                orderList.AskExt();

            return adapter.Get();

        }

code to call Smart Panel “cmdOrderList” from the new action button in aspx file.

    <ActionBar>

                            <CustomItems>

                                <px:PXToolBarButton Text="Add Order" Key="cmdOrderList">

                                    <AutoCallBack Command="AddOrder" Target="ds">

                                        <Behavior PostData="Page" CommitChanges="True" />

                                    </AutoCallBack>

                                </px:PXToolBarButton>

                            </CustomItems>

        </ActionBar>

Hope this helps!

Regards,

Greytrix

2 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • February 6, 2023

What you will need are:

  • A Graph Extension containing an action, its method, and a public view that will be used as the key for your smart panel.
  • A SmartPanel in your page referencing the public view you have declared in your graph plus a grid and embodied controls of the grid.
  • Configure the CallBack command on the page and where you want to place the button and Call the SmartPanel from Action in your graph.

This is a piece of customization that if you are not familiar with coding and have not taken the customizations courses of Acumatica, I am afraid won't be possible to make work by asking random questions on community. It will need a day(s) of work depending on the competency and familiarity of the person who is going to work on it.


Forum|alt.badge.img+9
  • Semi-Pro III
  • Answer
  • February 15, 2023

Hi Jeewani,

As per the Aaghaei, you need graph extension, smart panel and callback command for placing the Add order button. You can refer below piece of code that we had used for similar task for one of our client. It may shed some light...

Action for the graph extension..

  public PXAction<MyDac > addOrder;

        [PXUIField(DisplayName = "Add Order", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]

        [PXLookupButton]

        public virtual IEnumerable AddOrder(PXAdapter adapter)

        {

                orderList.AskExt();

            return adapter.Get();

        }

code to call Smart Panel “cmdOrderList” from the new action button in aspx file.

    <ActionBar>

                            <CustomItems>

                                <px:PXToolBarButton Text="Add Order" Key="cmdOrderList">

                                    <AutoCallBack Command="AddOrder" Target="ds">

                                        <Behavior PostData="Page" CommitChanges="True" />

                                    </AutoCallBack>

                                </px:PXToolBarButton>

                            </CustomItems>

        </ActionBar>

Hope this helps!

Regards,

Greytrix