0
votes

I need to migrate open Cases data from old system which listed on Excel file to Acumatica CRM using import scenario. After enabling the field by customizing the attribute and checking the loading result, the Date Reported field are still loaded with current date. After further checking, the problem can be solved by overriding DAC declaration. Since i am new to Acumatica framework, kindly need advice about how to Custom Base Attribute of the following field which declared on CRCase:

#region CreatedDateTime

public abstract class createdDateTime : IBqlField { }

protected DateTime? _CreatedDateTime;
[PXDBCreatedDateTimeUtc(InputMask = "g")]
[PXUIField(DisplayName = "Date Reported", Enabled = false)]
public virtual DateTime? CreatedDateTime
{
    get
    {
        return this._CreatedDateTime;
    }
    set
    {
        this._CreatedDateTime = value;
        _timeResolution = null;
    }
}
#endregion
2

2 Answers

1
votes

CreatedDateTime field is a system audit field. I do not recommend altering the behavior of audit fields. They serve a specific purpose.

I suggest create a DateReported user field to your application, and importing your source data to that field.

If you must use CreatedDateTime, mostly likely have to override the attributes using the CacheAttached method, of your particular graph. Again, I do not recommend altering the behavior of audit fields.

0
votes

I go with the idea that Date Reported is an system audited field and it is must not be altered. so, I create new custom field called "Date Raised" to input existing case date reported.