Showing posts with label Data Entity. Show all posts
Showing posts with label Data Entity. Show all posts

Skip/Bypass validation in Data Entity Import – D365FO

 


Skip/Bypass validation in Data Entity Import – D365FO


I had a scenario where I need to create the Tax Exempt Number dynamically when importing Vendors' data.

For instance, if the given VatNum does not exist in the input data, the system should bypass the validation and create the vendor without any error. 


So, how do we incorporate this validation? Using the COC method of persistEntity.

public void persistEntity(DataEntityRuntimeContext _entityCtx)
{   
    
        next persistEntity(_entityCtx);
     this.skipDataSourceValidateField(fieldNum(VendVendorsV2,
     VatNum),true);
    
}

The 'Dimension Legal Entity Context field' must be entered

 

The 'Dimension Legal Entity Context field' must be entered, when the extended data type is 'DimensionDynamicAccount' or 'DimensionDynamicDefaultAccount'.


Today, I was getting the following errors while creating one data entity, after searching over google I realized that two field-level properties on my entity should be filled.

  • DimensionLegalEntityContextField
  • DynamicDimensionEnumerationField

Path: [AxDataEntityView/ABCDEntity/Fields/LedgerDimension/DimensionLegalEntityContextField]:The 'Dimension Legal Entity Context field' must be entered, when the extended data type is 'DimensionDynamicAccount' or 'DimensionDynamicDefaultAccount'.

Path: [AxDataEntityView/ABCDEntity/Fields/LedgerDimension/DynamicDimensionEnumerationField]:The 'Dynamic Dimension Enumeration Field' must be entered, when the extended data type is 'DimensionDynamicAccount' or 'DimensionDynamicDefaultAccount'.




Solution


DimensionLegalEntityContextField

This field property should be filled with Data Area Id, for reference, I also pasted the screenshot.


DynamicDimensionEnumerationField

This field property should be filled with either 'DimensionDynamicAccount' or 'DimensionDynamicDefaultAccount for reference, I also pasted the screenshot.

Options:
  1. DimensionDynamicAccount
  2. DimensionDynamicDefaultAccount



Export All Legal entities data using One project in D365FO



Export all legal entities data 

 



In D365FO, if an export project is created for an entity, it exports the data only from the legal entity for which the user has triggered an export.

Setting the property ‘Enable cross-company in the base query of the entity will not help you here.

The behaviour is decided by one of the properties in the Data Entity.

You need to check the value of ‘Primary company context‘ in the entity. By default, it is set to ‘DataAreaId’. This means the data will be exported specifically to the company.

Clear the value from this property if the requirement is to export data from all the legal entities in a single execution.





Financial dimension configuration for integrating D365FO


Financial dimension configuration for integrating D365FO




Today, A bug reported to me that complete segments Default Dimensions are not exporting using Data Entity...

Functional share more detail with me Like, they set the default dimension with Positions.
Dimension has 9 segments but while they are exporting using data management framework then 5 dimension segments are missing in the Excel sheet.

Entity Name  > Position default dimensions

Here is the screenshot of the position and the set of dimensions.



Dimension set



Functional Create Export Project and Export the data and download the file




downloaded file screenshot





Resolution

After spending hours of hours and debugging in the code, finally, we found that this is a configuration issue and there is a template configuration form available for Dimension Integration..

General Ledger>Chart of accounts>Dimensions>Financial dimension configuration for integrating 

Here We define a segment that we need to export via integration.....

Navigate to Financial Dimension Configuration for Integration





Select Dimension in which you want to change...

Default is 4 Dimension were set in my case and the same was exporting.




Move your required segment from left to right list page.. for demo purposes I have moved all segments.

Save the record a confirmation prompt show on your screen... click on yes.  



Now Execute the Export project and download the export file.




Here is the final result... After changing in 





Dimension configuration working fine for me ...

Please feel free to contact me In case of any issue you are facing during the implementation of this blog


Custom Data Entity D365FO




Custom Data Entity in few steps



Step -1
Create New Project and Create a Table like below 





Step-2 
Now add 4 fields. Name, Age, ClassName and RollNumber. After this create an index add two fields RollNumber and className.


Reference: Screenshot



Step-3 
Right-click on the table and navigate to Addin and select Create Data Entity.




Step-4  
if you are facing the error Natural key is not found like the below screenshot.




Step-5 
Go to Table and change the primary index with your newly created index.



Step-6 
Now perform step-3 again... Hope everything will work fine for you.






Extension Cases-

If you have the requirement to create a Systems Out of the box table entity and you are facing the same natural key error then there is another way to create a data entity of the required table.




As we all know we can't change the primary index in Table extensions.. check the below screenshot Primary index field showing disable.



Step-1 Copy any existing Entity 
Step-2 Remove data source, Fields, relations indexes, Methods and groups
Step-3 Add Invent Trans add the required field and make index


Step-4 set the properties like below images


Step-5 Now regenerate the staging table











Data Import with Data entity execution parameters in parallel process


Data Import with Data entity execution parameters in a parallel process


In this Post we are discussing Entity execution parameters which can be found on the Data import/export framework parameters form. It will give you an option to improve the performance when importing large number of records using the data management features by running a parallel process.


Entity execution parameters
Use the next path to open the Entity execution parameters: System administration > Workspaces > Data management; Then click the Framework Parameters tile. The Data management workspace can also be started from your default dashboard.

Now click on it and select Entity setting Tabs and click on configure Entity Execution parameter.



As you can see in the picture above, you can specify a threshold per entity when the tasks need to be split and how many tasks will be created then. You can also make variations for the same entity.




Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...