A good resource to bookmark for any Dynamics 365 finance and operations professional is the Software lifecycle policy and list of releases page to track and get brief updates about platform and application releases with links to their detailed changes. This is updated regularly, last update was made yesterday 25th March 2018 about platform 15 which has a cool new addition of the ability to color grid rows without over laying as well as the application update 7.3.11971.62687
Regenerating/ updating a staging table in Dynamics 365 has literally been made as easy as a one click operation but somehow not well documented so I though i’d write a quick overview on how to update or regenerate a staging table based on your Data entity changes.
Open your data entity in visual studio and right click on the entity name like below this will show you the two options. Please note that if you regenerate a table all custom changes you made to that table will be lost. However if you use the update table option, only new changes will be added. For example if you add a field only on staging table and regenerate staging table the custom field will be lost, therefore if you would like to maintain your additions and update, use update staging table option.
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
If your batch job is not executing the first few things you should check before anything else are shown in the video below:
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
Using the below job you can update dimension values on an item.
static void UpdateDepartmentMISC_Items(Args _args)
DimensionAttribute dimAttDept, dimAttMisc;
DimensionAttributeValue dimAttributeValueDept, dimAttributeValueMisc;
str misc, dept;
int counter = 0;
info(strFmt('Start time: %1', time2StrHM(timeNow())));
inventTable = null;
dimStorage = null;
dimAttMisc = null;
dimAttDept = null;
dimAttributeValueDept = null;
dimAttributeValueMisc = null;
while select forUpdate inventTable
where inventTable.ItemId == itemId
&& inventTable.dataAreaId == curext()
dimStorage = DimensionAttributeValueSetStorage::find(inventTable.DefaultDimension);
dimAttDept = DimensionAttribute::findByName(#DepartmentDimensionToUpdate);
dimAttMisc = DimensionAttribute::findByName(#MISCDimensionToUpdate);
dimAttributeValueDept = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttDept, dept, true, true);
dimAttributeValueMisc = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttMisc, misc, true, true);
inventTable.DefaultDimension = dimStorage.save();
error(strFmt("Error to update dimension for item %1", inventTable.itemid));
info(strFmt("Records updated: %1", Counter));
info(strFmt('End time; %1', time2StrHMS(timeNow())));
See the below 2 min video for steps to create an AX client config for connecting to a specific AOS server.