How to get tstamp in Acumatica

Hello everybody,

today I want to shre small note of how to generate timestamp for Acumatica objects ( in case if you use for some reason PXDataBase.Insert or  PXDataBase.Update)

PXDataBase has public method SelectTimeStamp.

public static byte[] SelectTimeStamp()
    return Provider.SelectTimeStamp();

So, in case if you need to put in variable t TimeStamp you can do the following:

var t = PXDatabase.SelectTimeStamp();

And variable t will have timestamp

CreatedByID cannot be null in Acumatica

Hello everybody,

today I want to share how to cope with error message CreatedByID cannot be null and CreatedByScreenID cannot be null, and so on. In order to get rid of

those error messages use attributes [PXDBCreatedByID], [PXDBCreatedByScreenID],

 [PXDBCreatedDateTime], [PXDBLastModifiedByID], [PXDBLastModifiedByScreenID], 

 [PXDBLastModifiedDateTime], [PXDBTimestamp]. 

If somebody has a question, how I got such error message, the answer is simple. DAC generator generated those fields for me without those attributes, so only with the help of reflector I realized how to fix my issue.