Mark record in the grid get on the form data source – AX2012 R3 – Dynamics 365 for Finance and Operations

Scenario: You have 10 records in the grid and want to select(mark) on 5 and perform operations.  Then use below code to select mark records

Solution 1:

 

Hcmworker hcmWorker; // table

hcmWorker = this.getfirst(1);// 1 is reflecting the mark records

while (hcmworker)

{

//write custom code to perform operations

 

hcmworker = this.getNext()

}

 

Solution 2:

 

Hcmworker hcmWorker; // table

for(hcmWorker=hcmWorker_ds.getFirst(1);hcmworker;hcmworker=hcmworker_ds.getNext())

{

}

 

Batch job could not be found. Dynamics 365 for Finance and Operations, Ax2012 R3

Scenario/Problem:

Sometimes users facing an issue in the batch jobs when they delete the batch job in executing state from the back end or for any other reason(like batch job stuck in executing stage). Then they need to perform below steps to resolve the issue.

In my  case i was facing issue in the workflow batch job and my workflow are not working even after restarting the server or service.

Solution:

 

Perform select query on the below tables with caption filter by typing the keyword of the job you are looking for.

Batch and Batchjobs

Deleted batchjob has been deleted from Batchjob table but not from Batch table. So, I performed below query and my issue has been resolved.

 

First select query on both tables and then delete query to delete the records.

 

Screen Shot 2019-12-15 at 10.12.09 AM

The natural key for the table was not found. Microsoft Dynamics 365 for Finance and Operations – Microsoft Visual Studio

Scenario: Sometimes users facing the error ‘The natural key for the table was not found‘.

 

Screen Shot 2019-12-06 at 4.16.23 PM.png

 

Solution:

Open the table on which you are facing error. Then add the primary index like below

 

Screen Shot 2019-12-06 at 4.19.25 PM.png

 

After adding index synchronize the table and then try to create Data entity again.

Warning: Package folder already exists in deployment pipeline azure devops – Dynamics 365 For Finance and Operations

Issue:

When package creation is in routine work or often then users will receive below warning.

“Package folder already exists in deployment pipeline azure devops””

Resolution:

This is just a warning so users can ignore this message and check the other errors in the log file.

A financial dimension value is based on the ” record and has been used on a transaction. You cannot delete the ” record – Dynamics 365 for finance and operations – AX2012 R3

Scenario:

Sometime user trying to delete a record from the customer master or any data that relates to financial dimension. So, user is facing above error upon deletion.

Reason:

Error occurred because data exists in the table DimensionAttributeLevelValue

Solution:

  1. Access the open the table DimensionAttributeLevelValue 
  2. filter the record by Display Value field with the desired record to delete like customer number or employee number etc etc
  3. Select the filtered records
  4. Delete the selected records
  5. Then go back to customer master or where you facing the error
  6. Now try to delete you will be able to delete

 

AX 2012: you can directly delete the record by opening table

D365 : you can delete by access the SQL or write the runnable class to delete