web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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 14
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?
I have the same question (0)
  • Martin Dráb Profile Picture
    238,050 Most Valuable Professional on at
    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.
  • CU22120935-0 Profile Picture
    14 on at
    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
    238,050 Most Valuable Professional on at
    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.
  • CU22120935-0 Profile Picture
    14 on at
    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?
  • Waed Ayyad Profile Picture
    9,042 Super User 2025 Season 2 on at
    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
     
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    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.
  • CU22120935-0 Profile Picture
    14 on at
    Hi Bharani,

    What is not present? i don't think there is sth wrong, can you please explain more?
  • CU22120935-0 Profile Picture
    14 on at
    Any idea anyone?
  • Martin Dráb Profile Picture
    238,050 Most Valuable Professional on at
    The reason is that the field isn't editable (you said that Field1 is mandatory and allow edit false).
  • Waed Ayyad Profile Picture
    9,042 Super User 2025 Season 2 on at
    Hi,

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

    Thanks
    Waed Ayyad

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 678 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 407 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 283 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans