After creating a data entity you might receive the following 15 errors upon building it, these recommend you to do a full build of your package but this will not resolve the issue. The cause of this error is an existing entity record in your DMFEntity table and like some solutions have mentioned that you delete those records and rebuild they will work for only once but when you make changes and run a build again you will get a the same errors, so lets come to what is causing this. It is clear that there is a duplicate but when I verified that there is none according to my Entity name and table names within the DMFEntity table that could cause a duplicate, what could it be? Well to your and my surprise the label you have on your entity is also a factor when it comes to duplication. And since D365 has existing data entities for a number tables out of the box it is quite possible that your new entity that you built got the default table label.
Error Database synchronization failed. You may have to do a full build of the package ‘TrueValue_Retail’ and all of its dependent packages. 0
Error at Dynamics.AX.Application.DmfDataPopulation.`syncEntityMetadata(StringCollection dataEntityViewCollection, StringCollection compositeEntityList) in xppSource://Source/ApplicationFoundation\AxClass_DmfDataPopulation.xpp:line 817.’ on category ‘Error’. 0
Error Infolog diagnostic message: ‘Error synching entity metadata for entity – TVRetailExportLoyaltyCustomer. Message – at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue, interpret* ip) 0
Error Infolog diagnostic message: ‘Cannot create a record in Entity (DMFEntity). Entity: Loyalty card, TVRetailExportLoyaltyCustomerStaging. 0
Give your entity a custom label.
If you are unbale to find the w3wp.exe process that we attach our VS debugger to inorder to step through X++ on D365. Chances are the windows logging service is not running. The service name to check is W3C Logging Service start this service by going to services.msc and reopen/refresh the process list.
P.s Also make sure your World Wide Web Publishing service is running. Without which your D365 client wont be hosted as well.
For more details on how to debug D365 have a look at the MS blog: Quick and easy debugging in AX 7
When adding Unmapped fields(ones we do not intend to link up with any datasource field on the entity itself) to a data entity in Dynamics 365. You may receive the below compile error:
The property ‘ComputedFieldMethod’ must be set with the name of a valid data entity method if ‘IsComputedField’ is set to ‘Yes’.
This is because AX is expecting a computed method for it within the entity, when we do not intend to create that we need to Set the Is Computed Field property under Mics group to No
Often our DB logs grow out of hand and we are left with limited space; a common occurrence on dev boxes for AX. So among other remedies to get more space is shrink your database log files and you can do so by using the queries below. Make sure you back up your databases before you run this, make this a standard practice before changing/modifying any meta on your db servers. You can do this for both your trans and model databases for Dynamics AX 2012.
— Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE DynamicsAXDev_model
SET RECOVERY SIMPLE;
— Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (DynamicsAXDev_model_Log, 1);
— Reset the database recovery model.
ALTER DATABASE DynamicsAXDev_model
SET RECOVERY FULL;
An invoice when posted goes into the following tables:
For Invoice Header:
VendInvoiceJour defaults from VendInvoiceInfoTable
For Invoice lines:
VendInvoiceTrans defaults are from VendInvoiceInfoline table
See bttom to top:
Then a single record is inserted in VendTrans then VendTransOpen, see bottom to top
When trying to install visual studio tools the following error occurs “This installation package could not be opened. Verify that the package exists and that you can access it” This is mostly caused by VS tools folder missing inside the msi folder of your installation setup. If these folders are there then you might have a different issue. To resolve this for R3 builds follow the following blog by Microsoft support:
After this simply run your installer again and add the visual studio component, worked like a charm for me!
Time taken: 40mins
For transferring demo data into R3 versions of AX 2012 follow the below:
||Get Demo data package and extract it into any feasible location (Extraction will be large about 15-20GB)
||Get Data transfer tool to transfer package extracted data in AX DB
||Import MetaDataXMLGenerator.xpo into AX environment and run the job
|This will be found in the Data transfer tools folder you extracted above
||Copy Metadata file generated as output of the above job to the [Lists] folder in the Data Transfer tool directory
||File is mostly generated at the following path
||STOP AOS before moving to the next step
||Open command prompt as admin. Go to directory where Test import tool was extracted.
Run the following command
Takes hours (2-3 approx.)
|DP.exe IMPORT “C:\Users\mohsin.khalid\Downloads\MicrosoftDynamicsAXR3CU8DemoData” MicrosoftDynamicsAx
FYI; In above command “MicrosoftDynamicsAx” is your ax db name
||Total time of activity
||4 hours approx
To debug without setting up a startup project and startup object in D365 fotr operations. Follow these steps:
- Open your object in visual studio
- Place breakpoints
- Goto Debug>attach to process and check show processes from all users
- Select w3wp.exe and click attach.
You can execute your process now from the client and execution will be stopped at your breakpoints.
Recently faced a problem where my breakpoints weren’t loading for objects in the AOT that were not in my solution and therefore I could not debug.
Solution: In order to load symbols for objects that have not been included in your solution you have to uncheck the following check box.
Load symbols only for items in the solution
To know more about how to debug in D365 visit: Debug X++
To recall a workflow through code you can use the cancelworkflow method in workflow class. It takes the correlationId and a comment as parameters and gets the job done for you. Example
workflow::cancelworkflow(CorrelationId, “Cancelling this workflow”)
Now you are probably thinking How do I find my workflows CorrelationId. You can do that by querying WorkflowTrackingStatusTable sorting it with time and instance number and joining it with SysWorkflowtable against the correlationId field and in the contextId you pass the RecId of your record for example PO RecId.