Skip to main content
Answer

Add new button.

  • October 2, 2023
  • 1 reply
  • 146 views

Forum|alt.badge.img

Hi Team,

How to add new button to following red highlighted area?

 

Thanks

Best answer by praveenpo

Hi @bhagyat25,

Below is a sample example to add a button in a graph.

public class TestGraph : PXGraph<TestGraph>
    {
          public PXAction<DACName> TestConnection; 
        [PXButton]
        [PXUIField(DisplayName = “TestConnection”, MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select, Enabled = false)]
        protected virtual IEnumerable testConnection(PXAdapter adapter)
        {
                      // logic here


          return adapter.Get();
        }
    }


Hope this helps!!

1 reply

praveenpo
Semi-Pro III
Forum|alt.badge.img+3
  • Semi-Pro III
  • Answer
  • October 2, 2023

Hi @bhagyat25,

Below is a sample example to add a button in a graph.

public class TestGraph : PXGraph<TestGraph>
    {
          public PXAction<DACName> TestConnection; 
        [PXButton]
        [PXUIField(DisplayName = “TestConnection”, MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select, Enabled = false)]
        protected virtual IEnumerable testConnection(PXAdapter adapter)
        {
                      // logic here


          return adapter.Get();
        }
    }


Hope this helps!!