Hello everybody,
today I want to leave a short notice on how to join few customizations into one. Basically all you need is publish customizations you want to have merged, and then on Customization Projects form ( SM204500 ) click on button View Published and then click on Download package. In that way you'll get Customization.zip which will be merged result of published customizations.
Hello everybody,
today I want to leave a short code sample on how to modify PXIntList or dropdown list in Acumatica. Below goes code sample of it:
protected virtual void _(Events.RowSelected<CROpportunity> e)
{
if (e.Row == null)
return;
var opportunityExtension = e.Row.GetExtension<CROpportunityExt>();
if (opportunityExtension.UsrProduct == 0)
{
var listInts = new List<int>();
var listStrings = new List<String>();
listInts.Add(0);
listInts.Add(1);
listInts.Add(2);
listStrings.Add("String 1");
listStrings.Add("String 2");
listStrings.Add("String 3");
PXIntListAttribute.SetList<CROpportunityExt.usrProposition>(e.Cache, e.Row, listInts.ToArray(), listStrings.ToArray());
}
if (opportunityExtension.UsrProduct == 1)
{
var listInts = new List<int>();
var listStrings = new List<String>();
listInts.Add(0);
listInts.Add(3);
listInts.Add(5);
listStrings.Add("String 2");
listStrings.Add("String 3");
listStrings.Add("String 4");
PXIntListAttribute.SetList<CROpportunityExt.usrProposition>(e.Cache, e.Row, listInts.ToArray(), listStrings.ToArray());
}
}
This code sample has two most important parts:
- RowSelected ( declared over new syntax )
- PXIntListAttribute.SetList<CROpportunityExt.usrProposition> call
With usage of those two principles you can easily get modifiable collection accoding to necessary conditions in your code.
Hello everybody,
today I want share with you, how you can create new Company and set it settings.
For creating new company, we should go to "Tenants" screen:

Notice, that in old vercions of acumatica instead the "Tenants" was the "Companies":

Let create new company, and give it name "Exotic Places":

When process of creation is finished, we'll automatically be logged out:


To fix this, let's copy the settings from existing company to our. First of all let us sign out from "Exotic Places" and sign in to "Company". Then open "Tenants", chose the "Company" and click to "Create Snapshot" button:

We get a warning message, but it possible easily deal with it, only go to this link, to short post of my blog and you'll done it. After it let try again:


Press "Save" on the toolbar of the form, then import snapshot into our new company:

Now let's restore snapshot to "Exotic Places":

After it let explore, what have we done:


Summary: if you'll create new company, then you will need to set the settings for it. To do this, you can copy them from an existing company (as shown on the top):
1. Create the snapshot.
2. Export it.
3. Upload snapshot in new company.
4. Restore snapshot for it.
Hello everybody,
today I want to make a post about new security feature of acumatica, which guard you from creating corrupted data. Suppose you are System Administrator and want to make snapshot for being able use it to set settings to new company, which you just created. However, some user might use it too, and this may cause the creation of bad records. For this reason, in latest versions of Acumatica (from 2017 R2), when you try to create snapshot, you'll recieve an warning message:

Warning message informs, that you should switching the maintenance mode, so do it, as shown below, by click "SCHEDULE LOCKOUT":

Now you able, without any risk, create snapshot: 
On the end, don't forget to remove the lockout by click "STOP LOCKOUT":

Using this technique, your Acumatica application will be safe and stable.
Hello everybody,
today I want to speak about one very interesting feature of FBQL, which I don't know if exists in BQL. Function Brackets!
Take a look on following code sample:
var bracketsDemo = SelectFrom<SOOrder>.InnerJoin<SOLine>.On<SOLine.orderNbr.IsEqual<SOOrder.orderNbr>>.InnerJoin<SOShipLine>
.On<SOShipLine.origOrderNbr.IsEqual<SOOrder.orderNbr>>.Where<
Brackets<SOShipLine.confirmed.IsNotNull.
And<SOShipLine.baseOrigOrderQty.IsNotNull>.
And<SOShipLine.completeQtyMin.IsNotNull>.
And<SOShipLine.confirmed.IsEqual<True>.
Or<SOShipLine.confirmed.IsNull>>.
And<SOShipLine.baseOriginalShippedQty.IsGreater<SOShipLine.unassignedQty>.
Or<SOShipLine.baseOrigOrderQty.IsLess<SOShipLine.baseOriginalShippedQty>>>>.
Or<SOShipLine.baseOrigOrderQty.IsNotNull>>.AggregateTo<GroupBy<SOOrder.orderNbr>,
Min<SOOrder.curyDiscTot>>.OrderBy<SOOrder.curyFreightAmt.Asc, SOOrder.curyDocDisc.Desc>.View.Select(Base);
as you can see from the code, now in FBQL if you need to have Or operator, then as anohter option you may use Brackets.