Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / update not allowed for...
Finance forum
Unanswered

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 contains TableX as a primary datasource (not read only) and it's outer joined with Table1 (which is a 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, "allow edit" is false and "allow edit on create" is true.
Also 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.

There is 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
    Martin Dráb 230,468 Most Valuable Professional on at
    update not allowed for field 'TableX.Field1'
    This is a duplicate of DMF Import error: update not allowed for field 'TableX.Field1'. The discussion should continue there, not here. Starting the discussion from the beginning and repeating everything once more wouldn't be useful for anyone.

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 Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

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... 291,759 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans