Skip to main content
Dynamics 365 Community / Forums / Finance forum / Virtual entity error w...
Finance forum
Answered

Virtual entity error when inserting record 'Number VER-000000 does not match format VER-######.'

editSubscribe (0) ShareShare
ReportReport
Posted on by 3,011
I have a power automate cloud flow that is attempting to insert into my dataverse table that was created from a custom data entity in F&O.
This field is the ServiceOrderId field.  I am attempting to send it a generic value so that it will create a new record using the number sequence specified in F&O.
 
This data entity works as expected when used with dual-write and custom dataverse tables.  I am able to send a value of '0000' and F&O creates a new ServiceOrderId for the record coming in.
 
In my dataentity I have overriden the 'initValue' with the following:

    public void initValue()
    {
        if (!this.skipNumberSequenceCheck())
        {
            NumberSeqRecordFieldHandler::enableNumberSequenceControlForField(
                this, fieldNum(VER_SMAServiceOrderHeaderEntity, ServiceOrderId), SMAParameters::numRefServiceOrderId());
        }
        super();
    }
 
As of yet I have been unable to debug anything coming into my data entity via the virtual entity table in dataverse.
Categories:
Attachments
  • Verified answer
    b_radlyjames Profile Picture
    b_radlyjames 3,011 on at
    Virtual entity error when inserting record 'Number VER-000000 does not match format VER-######.'
    The solution to this problem is the following:
     
    Instead of using the primary key from the underlying table, in this case ServiceOrderId, create a new field and make it the primary key on the staging table and entity.  This will allow the ServiceOrderId value to be blank and the system to generate a value for you.
  • Hana Xue Profile Picture
    Hana Xue Microsoft Employee on at
    Virtual entity error when inserting record 'Number VER-000000 does not match format VER-######.'
    Hi,
    You can check out this document Configure number sequences and autonumber columns when using dual-write - Finance & Operations | Dynamics 365 | Microsoft Learn, which mentions that during the initial synchronization of dual-write, you may receive an error message similar to one of the following examples:
    Field ABC does not allow editing. Number CE-20000001 does not match format ######. Validations failed.
    Best Regards,

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,183 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,733 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans