Dynamics 365 for finance and operations
Hi all, I face this error, while extended existing custom report. I added some fields in temp table, after update logic in dp class, On report data set update.
But at run time report shows this error. While debugging the code, I found the error occur on mapping the new fields in temp table.
I build the whole model. After that error was removed.
Hi all, In some cases we can need to copy financial dimension from one object to other for example Customer to Sales order or Vendor to purchase order.
In Ax 2012 it little easy. But in D365 For finance and operations, it is little bit tricky.
I did this with following code snippet. With the help of out of box. LedgerDimensonDefaultFacade class i used the merge default dimension method and passed same table dimension in form and to dimension.
Result is interesting.
In Ax 2012 we get menu name with element.Args().CallMenu name, using taking decision on menu name.
But same logic we need to apply in Extension. But in D365 For finance and operations we did not overlay. Following code snippet helps me to implement similar logic in Extension.
final class IaLogisticsContactInfoGrid_Extension
/// <param name=”sender”></param>
/// <param name=”e”></param>
public static void LogisticsContactInfoGrid_OnInitialized(xFormRun sender, FormEventArgs e)
FormRun formRun = sender;
Hi did one customization, where I create Ledger Journal using X++ code. It was working perfectly fine with Ledger General Ledger entries. But threw error on creating Ledger for AR,PR Payment.
I created ledger with following code snippet. But it works only for Ledger for of Type Daily
AxLedgerJournalTable header = new AxLedgerJournalTable();
AxLedgerJournalTrans trans = new AxLedgerJournalTrans();
LedgerJournalNameId ledgerJournalNameId = “payment”;
I replaced the above code with following snippet it works perfectly fine, rest of the code is works fine
select firstonly ledgerJournalName
where ledgerJournalName.JournalName == parameters.LedgerJournalNameId &&
ledgerJournalName.JournalType == LedgerJournalType::CustPayment;
ledgerJournalTable.JournalName = ledgerJournalName.JournalName;
ledgerJournalTable.Name = ledgerJournalName.Name;
Hi Today I found very interesting post here , where we can use “In” keyword for While select or Select statement.
in will be enum based.
container con = [SalesType::Sales, SalesType::ReturnItem, SalesType::Subscription];
select * from salesTable
where salesTable.SalesType in con
For paging in X++ Query. There are three steps required. Rest of Query Code is same.
We have to set following things in Query data source
- Set Sort field in Query data Source.
- Paging position property of QueryRun is set to true.
- Add page range with starting position and number of records in QueryRun
Here is code snippet
Query query = new Query();
Int pageSize = 2;
qbd = query.addDataSource(TableNum(ProjPlanVersion));
qr = new QueryRun(query);
startingposition = CurrentPageNumber * pagesize;
I still like the Idea shared by “Gary Vaynerchuk ” Post ” Document dont create” So I document what I face today and resolved.
Today I am facing Project compilation Error in Visual studio output pane, I am struggling to understand Table control, so I can meet the development of my next assignment. Error was
Severity Code Description Project File Line Suppression State
Error One or more errors occurred. —> System.InvalidOperationException: Cannot stop DynamicsAxBatch service on computer ‘.’. —> System.ComponentModel.Win32Exception: The service cannot accept control messages at this time
— End of inner exception stack trace —
When I open Services, I found that DynamicsAXBatch services is in stopping mode and stuck.
So I killed the service process with CMD command. “taskkill /f /pid [pid number]”
The message already shows the service name. ” DynamicsAXBatch” You can copy it from Service detail dialog.
So Open CMD with run as administrator and run the following command and get pid
sc queryex DynamicsAxBatch
Now I have IP.
And kill the Process Id
taskkill /f /pid 5352
Now I start the service again.
Project is successfully complied.