X++ Code To Use Existing NumberSeq While importing Data via OData Services - D365 F&O

Hello Everyone,

Today we will be looking at using the existing number sequence while importing a record using Odata and to have the record imported with automatic number sequence on any field. We need to overwrite the initValue method of DataEntity. Let us see how is the code is build.

public void initValue()

{
    if  (!this.skipNumberSequenceCheck())
    {
        NumberSeqRecordFieldHandler::enableNumberSequenceControlForField(this,
                                                                         fieldNum(
Name>, <fieldname in the entity>),
                                                                             WHSParameters::numRefWHSLoadId());

     }

        super();
}



Proud To Be a DAX Developer :-)

No comments:

Post a Comment