today I want to share one simple technic of how to filter inserted items in cache from other objects. I discovered it with reflector, while diffing in code of APInvoiceEntry.
Here it is:
Adjustments.Cache.Inserted - this item will give you which items were inserted in view Adjustments.
Another interesting details was updated:
will give you updated items in cache.
And of course deleted:
today I want to share with you information about two functions:
SetValueExt and SetDefaultExt.
Names of them are pretty self-explanatory, which means SetValueExt assigns specific value to field and SeDefaultExt assings default value to a field. But SetValueExt method raises the field-level events for the data field as when a data record is updated. The SetDefaultExt<>()method of the cache to assign the default value a field. The method raises the field-level events for the data field as when a data record is inserted. more
today I want to note how to use PXDataBase.Update in Acumatica.
1. Imagine, you need to set APSubID = 80 in APRegister with APAccountID = 5:
you can use the following:
new PXDataFieldRestrict("DeletedDatabaseRecord", PXDbType.Bit, false));
2. Set DocBal = 80 and DocDesc = “blah blah blah” in table APRegister with APAccountID = 5 and APSubID = 80:
new PXDataFieldAssign<APRegister.docDesc>("blah blah blah"),
new PXDataFieldRestrict<APRegister. … more