Wednesday, April 17, 2019

Dynamics AX 365 - insert not allowed for fields In Data 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. Chaneg 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 soluton

Wednesday, April 3, 2019

Explore metadata search feature in Visual Studio D365 FO


Access the Metadata search tool window from the Dynamics 365 > Metadata Search.


Search Keyword Description
Code # Search for a specific code. Use quotes around code snippets. The matching source code is the elements that contain the specified code snippet.
Type # Filter the elements by type  Each comma-separated value should be the name of an element or sub-element type (root type or subtype) (i.e. table, class, field). Logic of filtering is:
Model # Filter the elements by model Each comma-separated value should be the name of a model in your application
Name # Filter the elements by name This is the default filter, meaning if you just type a filter value, it is assumed to be an element name. Each comma-separated value is an acceptable element name.
Property # Search for element with the property with the specific value  Each comma-separated value should be in the form property_name=property_value



Note: Make sure there should not be any space in between Type values otherwise it will show "Invalid query" error.

Cleaning up cross-reference DB in Dynamics 365 for finance and operation ON DEV VM


// For unwanted cross reference data clean Up on DB (DYNAMICSXREFDB)

DELETE [REFERENCES] FROM [REFERENCES]
    JOIN Names 
ON (Names.Id = [REFERENCES].SourceId 
OR Names.Id = [REFERENCES].TargetId)
    JOIN Modules 
ON Names.ModuleId = Modules.Id


Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...