Hi everybody,
below goes video, which describes on how to get started with Acumatica development:
In that video you'll find out:
1. How to install specific Acumatica build
2. How to debug C# code written by you in Visual Studio and Customization designer
3. How to get possibility to debug Acumatica source code
4. Default user name and password of Acumatica instnace
And much much more. Please watch and support with your likes!
Hello everybody,
today I want to write few words about buttons usage in Acumatica.
So, first of all, if you just need to add button at your form, you can use following syntax:
public PXAction<PrimaryDACClass> SomeAction;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Some Action")]
protected virtual void someAction()
{
...
}
Following syntax will create a button for you in the top buttons panel of Acumatica.
Take note of CommitChanges=true attribute. In case if you need just some activity without persistance to database, then you can set it to false. But if you want button to save some changes to database then set it always to true.
There is one more way of declaring buttons:
[PXButton]
[PXUIField(DisplayName = "Some action")]
protected virtual IEnumerable someAction(PXAdapter adapter)
{
...
return adapter.Get();
}
take note that in comparison with previous time method of button returns ienumerable, and also in the end has return adapter.Get();
This type of calling should be used if button is called from processing page or if button initializes background operation.
Hello everybody,
today I want to write a few words about two types of buttons in Acumatica.
- usual form of declaration
- unusual form of declaration
What is difference from code prospecitve?
In the begining they are equal:
public PXAction<Shipment> CancelShipment;
Even very similar with attributes:
1.
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Cancel Shipment")]
2.
[PXButton]
[PXUIField(DisplayName = "Release")]
But different with declaration:
- protected virtual void cancelShipment()
- protected virtual IEnumerable release(PXAdapter adapter)
and different with last statement. Those with PXAdaapter should return adapter.get(); Like this:
[PXButton]
[PXUIField(DisplayName = "Release")]
protected virtual IEnumerable release(PXAdapter adapter)
{
...
return adapter.Get();
}
And one more. Unusual should be used when click on button initates background operation or is called from processing pages