Skip to main content

Import Entity

 

ERROR : INSERT NOT ALLOWED WHILE IMPORTING ENTITY 


Dynamics AX 365 - insert not allowed for fields

Data entity related

Solution 1:

1. Data entity and staging table those error fields shouldn't set property for AllowEdit and AllowEditOnCreate to "NO".

2. Change those field property to "Yes"

3. Rebuild solution and SYNC DB

4. Refresh entity List


Solution 2:

1. Code: this. skipDatasourceValidationField(FieldNum(<DS Name>, <DS Field Name>), true);

2. Write above on data entity methods (mapEntityToDatasource and intializedEntityDatasource

3. Rebuild solution.



HEY HEY HEY !!!! HACK OF THE DAY 

1. ALWAYS DO REFRESH ENTITY LIST
2. GENERATE MAPPING 


Comments

Popular posts from this blog

Edit Method on Form

Edit Method D365 for a form Data Source 1. To create an edit method first create a controller class. with following properties  public static edit MainAccountNum LedgerJournalTransLedger(LedgerJournalTrans _ledgerjournal, boolean _set, MainAccountNum _id) { MainAccountNum accountId = _id; MainAccount mainAccount = MainAccount::findByMainAccountId(_id); if(_set) { if(_ledgerjournal.AccountType== LedgerJournalACType::Ledger) { mainAccount = MainAccount::findByMainAccountId(accountId); if(_ledgerjournal.LedgerDimension) { DimensionDefault defaultDim = LedgerDimensionFacade::getDefaultDimensionFromLedgerDimension(_ledgerjournal.LedgerDimension); _ledgerjournal.LedgerDimension = LedgerDimensionDefaultingEngine::getLedgerDimensionFromAccountAndDim(mainAccount.RecId, DimensionHierarchy::getAccountStructure(mainAccount.RecId), defaultDim); } else { _ledgerjournal.LedgerDimension = LedgerDimensionDefaultingEngine::getLedgerDimensionFromAccountAndDim(mainAccount.RecId, DimensionHierarchy::ge...

Virtual Field

    VIRTUAL FIELD MAPPING IN AN ENTITY D365 FinOps 1. Create an unmapped field in an Entity Fields section and apply following properties to an unmapped field.  2. Same goes for Staging table : 3. Write following bunch of code in Entity code ( Press F7 ):  To check this field use import export in D365 or use excel add in to manipulate this unmapped field.     HEY HEY HEY !!!! HACK OF THE DAY !!!        entitytodatasource -------   write function        datasourcetoentity -------- read function

EXCEL Add-in D365 FO

EXCEL add-in USED FOR D365 DATA ENTITY To use excel add-in for D365 data entities for CRUD operations. You can easily follow below mentioned steps: 1. Open Excel from any Desktop or VM and click on Add-ins option under insert tab: 2. Check if you have Microsoft Dynamics Office Add-ins, If not then download it from Microsoft store: 3. If you have above mentioned Add-in click on this and click add server information: 4. In server URL add your environment URL either dev, UAT or PROD and click OK.  for e.g:  (https://xxxxxxxxxxxxxxxxxxx.dynamics.com/)  5. Click on Design button and it will display below mentioned screen: 6. Click on Select entity data source and choose your desired data entity from list on which you need to perform CRUD operations and click on NEXT: 7. Double click on each field present in AVAILABLE FIELD SECTION to get them in SELECTED FIELD SECTION: 8. Click on Refresh Once and you will be able to see data in your entity in Excel: 9. After making changes to...