Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

DMF Field '' does not allow editing

Posted on by 3,061
I have a custom Data Entity for the Service Order Table.  My primary key is my ServiceOrderNumber field.
When I import a file with an existing ServiceOrderNumber it updates the record as expected.
However, if I want it to create a new record I can't use the 'Auto Generate' on my primary key as that would break the 'update'.
 
So, I decided to follow what had been done in the CustCustomerV3Entity.
I set my 'ServiceOrderNumber' 'Allow Edit' field properties on the Entity and Staging table to 'Yes'.
 
In looking through all the setup and code for the customer entity, this seems to be it.  However, I still get:
 
 
The second error is a result of the first error and may not matter (I believe).
 
 
  • Verified answer
    b_radlyjames Profile Picture
    b_radlyjames 3,061 on at
    DMF Field '' does not allow editing
    UPDATE:
     
    I was able to get this to go through by removing the 'SERVICEORDERNUMBER' field from my import file.
    Previously I had it in there but with no value.  Once I removed it, it created the record and the used the number sequence for the service order number.
     
     This does, potentially, pose an issue as I believe Dual-Write will be sending this data entity a value to be used for an update or no value to cause a new record to be created.
  • b_radlyjames Profile Picture
    b_radlyjames 3,061 on at
    DMF Field '' does not allow editing
    UPDATE:
     
    In doing more research, I found that the label from this error was this:
     
     
    This label is referenced in 4 classes. Only 1 of which would be used by DMF.  
     
    That led me to the NumberSequenceTable and the 'numAllowEdit' method.
    That method says that unless one of 3 fields is set to 'Yes', the field using the number sequence is NOT editable:
     
     
    Once I set 'To a Higher Number' to yes (Seemed like the safest change for my purposes) the '... does not allow editing.' error went away.
    The other error remains.  It looks like it isn't generating a new Service Order Number like it should.  Based on the CustCustomerV3Entity, I did the following in the 'initvalue' method of my data entity:
     
     
    This is similar to what I see on the CustCustomerV3Entity and other Data Entities that allow Write operations.
    I believe this is supposed to tell the field to use the Number Sequence specified in 'SMAParameters'.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,946 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,426 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans