Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

DMF Import error: update not allowed for field 'TableX.Field1'

(1) ShareShare
ReportReport
Posted on by
Hi,

I'm trying to import data to an entity but i'm getting this error:
update not allowed for field 'TableX.Field1'

The entity is not read only.
The entity primary table is TableX and also it's not read only
the entity key is another field: Field2 (not Field1)
Field1 in the entity is private

The entity staging table doesn't contain Field1

In the table itself (TableX), Field1 is mandatory and allow edit false. And the unique index for this table contains more than one field, and this Field1 is one of them.

I exported one record and tried to import again and got the same error.


Note: The entity and table are ISV (not mine), so if i need to amend sth it will be via extensions or is a change required in the ISV solution itself?
  • Waed Ayyad Profile Picture
    7,851 Super User 2025 Season 1 on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad
  • Martin Dráb Profile Picture
    231,837 Most Valuable Professional on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    The reason is that the field isn't editable (you said that Field1 is mandatory and allow edit false).
  • CU04051814-0 Profile Picture
    on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    Any idea anyone?
  • CU04051814-0 Profile Picture
    on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    Hi Bharani,

    What is not present? i don't think there is sth wrong, can you please explain more?
  • Bharani Preetham Peraka Profile Picture
    3,622 Moderator on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    Seems like in the select statement the field what you are trying to assign is not present. Try to get the field in the select statement and assign then debug and see if the field is getting value.
  • Waed Ayyad Profile Picture
    7,851 Super User 2025 Season 1 on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    Hi,
     
    You mentioned "In the table itself (TableX), Field1 is mandatory and allow edit false.", so you can't update this field, try to import new record and set the Field1 value, try it and tell us the result.
     
     Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • CU04051814-0 Profile Picture
    on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    Hi Martin,

    I edited the code in the previous reply. Sorry there is no Table2. Please check it out again

    The code i showed is inside the entity. The entity contains TableX as a primary datasource (not read only) and it's outer joined with Table1 (which is a read only)

    I'm getting the error for TableX.Field1

    How can i select importable fields, can you please explain?

    The thing is i got this error when CE is synced to FO via dual write -- so i wanted to try import manually via DMF and i got the same error. What shall i do to fix this error?
  • Martin Dráb Profile Picture
    231,837 Most Valuable Professional on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    The code you showed refers to Field1 from TableX, not the entity. Is Field1 of the entity bound to TableX.Field1?
     
    The code can't work correctly, because Table1 buffer is never assigned and therefore all its fields are always empty. Maybe you meant Table2 instead.
     
    A file you export doesn't have to be importable, exactly because some fields can be exported but not imported. By the way, when you're adding an entity to a data management project, you can choose that you want importable fields only.
  • CU04051814-0 Profile Picture
    on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    Hi Martin,

    ​​​​​​​ I didn't understand why i got the error, as i'm not importing into it (i mentioned that i exported a records and just tried to import it again). So I didn't understand your answer, can you please explain more what i should do?

    btw i found this code in the entity:
        public boolean insertEntityDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx)
        {
            boolean ret;
    
            if (_dataSourceCtx.name() == tableStr(TableX))
            {
                Table1 table1;
    
                select firstonly Field1, FieldA, FieldB from table1 where Table1.FieldC == this.FieldZ;
    
                TableX tableX = _dataSourceCtx.getBuffer();
                tableX.Field1 = table1.Field1;
                tableX.FieldA = table1.FieldA;
                tableX.FieldB = table1.FieldB;
    
                _dataSourceCtx.setBuffer(tableX);
            }
    
            ret = super(_entityCtx, _dataSourceCtx);
        
            return ret;
        }
     
  • Martin Dráb Profile Picture
    231,837 Most Valuable Professional on at
    DMF Import error: update not allowed for field 'TableX.Field1'
    If the field is private, you can import data to it. Private fields are used by code inside the entity. For example, you import an natural key and a piece of code determines a RecId from the natural key and set it into the private entity field.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,025 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,837 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans