≡ Menu

Microsoft release a new course for Dynamics 365 for operations.

This course contains the procurement process from start to finish with the transportation Management.

You can find this course at following link

For https://mbspartner.microsoft.com/D365E/CourseOverview/1565`

{ 0 comments }

{ 0 comments }

With reference to blog.MSdn.Microsoft, New version for Microsoft Management Report for Dynamics Ax 2012 is now available. You can download it from

https://mbs.microsoft.com/customersource/northamerica/MR/downloads/service-packs/MROverview

For more information kindly visit following link

https://blogs.msdn.microsoft.com/axinthefield/management-reporter-2012-cu16-is-now-available

{ 0 comments }

Let discuss real time scenario. In one of my custom SSRS report, Client wants to open Saleorder form by clicking on Customer Account, By default it leads to customer detail form. I used following link to build this functionality.

https://technet.microsoft.com/en-us/library/cc582049.aspx

https://dynamicsaxinsight.wordpress.com/2014/12/23/ax-2012-ssrs-report-drill-through-action-url/ to complete the re

If you read the Microsoft link on TechNet in one of above. It also described the way to call the form, whose reference method is not include in existing Drill through Common Helper class of SRSDrillThroughtCommon project.

But one thing is missing. What if the targeted form did not have code to catch coming record and did not show the desired result. For this we have to add some customization or add code to read upcoming record.

With following line of code you can catch SSRS passed record with Element.args().lookupRecord().

Common commonLookup;

commonLookup= element.args().lookupRecord();

  .

{ 0 comments }

A year ago, I did some customization, where ledger entries are done with X++ code. Now client wants Reverse ledger entries. As per logic reverse ledger entries has only difference is debit amount will be credit amount and versa vise. With X++ code  80 percent of these entries are successful, But 20 percent were fail with following Error.

Voucher not Specified as of …

So what is solution. I found only solution to read next voucher from sequence number and assign to ledger trans before posting it. I used following code snippet to get and set next voucher

 

    select firstOnly numSeqTable

where numSeqTable.RecId  == ledgerJournalName.NumberSequenceTable;

if (numSeqTable)

{

numberseq = numberseq::newGetVoucherFromCode(numSeqTable.NumberSequence);

trans.parmVoucher( numberseq.voucher());

}

 

 

Now customization works perfectly fine.

 

{ 0 comments }

Currently I just complete small not more than 10-pages white paper released by http://www.meritsolutions.com

I love is definition of Dynamics 365 in article. For your reference I copied it

“Microsoft Dynamics 365 is Microsoft’s next generation of intelligent business applications delivered in a single-tenant cloud environment. Dynamics 365 unifies CRM, ERP, BI, IoT, and mobile capabilities by delivering new purpose-built applications to help manage specific business functions, including Dynamics 365 for Operations, Dynamics 365 for Sales, Dynamics 365 for Customer Service, Dynamics 365 for Field Service, and Dynamics 365 for Project Service Automation. Designed to be personalized, enable greater productivity, deliver deeper insights, and adapt to business needs, Microsoft Dynamics 365 applications help businesses accelerate digital transformation to meet the changing needs of customers and capture the new business opportunities of tomorrow.”

 

As white paper described with reference of Gartner That following four factor must be in consider the before purchase or ERP implementations.

  • IT cost savings.
  • Business process efficiency.
  • Process standardization on a business process platform.
  • Ability to be a catalyst for business innovation.

 

And In white paper, writer successfully proves that Dynamics 365 is qualifies and better then NetSuite

 

For more detail download it from

http://www.meritsolutions.com/microsoft-dynamics-365/microsoft-dynamics-365-vs-netsuite-white-paper/

 

Disclaimer

The screenshot used in this post is taken from white paper.

{ 0 comments }

Time change, Things change but experience always counts. Today I decide to write a post to build very simple custom Report Data provider based report. It is similar report I  developed back in May or April 2012.

My current development environment is Dynamics 365 for operations Update 2 vm on my personal Laptop vm.

Prerequisite of this post  is understanding the AOT in Visual studio and basic programming language like C#.

 

In very simple basic level RDP report three objects are required.

Data contract,  Data Contract class  ties with extended data types. This class contain properties with getter setters. At run time these properties act as report parameters.

Data Provider Class. This class act as container for report logic.  Here we get Report Query or parameters of Data contract class and perform queries on required tables. This class is extended with framework class.

Temperory table

Temperory table is used as bridge for data between report designer (DataSet) and Report logic. We populate temporary table with required logic in data provider class.

 

Report Requirement:

 

Client wants a report where End user select Customer and Report shows, Customer Name, Sale order Number, Item Id, Item group. Sales order Quantity, expected delivery date of Sale order and Unit Sales price. The report must be print in A4 paper size.

Mapping:

 

So our first step is to create mapping. This mapping contain following things.

  • Expected field Name
  • Description / explaination / expected values
  • Orignal table field, which we read and map to temporary field.
  • Extended data type. You can get it from original table field. This is optional, but good in the case of create links and length of fields in table.

 

So build following table with our requirement and generates mapping.

Report Column Description Dynamics 365 for operation Mapping Extended data Type /  Base Enum
Order Number Sales Order Number SalesLine.SalesId SalesIdBase
Item Number Item Number SalesLine.ItemId ItemIdSmall
Item group Item Group InventItemGroupItem.ItemGroupId ItemGroupId
Sales Price Sales Price SalesLine.UnitPrice SalesPrice
Open Qty Order Line Quantity SalesLine.QtyOrdered InventQty
CustAccount Cust Account Salesline.CustAccount CustAccount
CustName CustName CustTable.Name() Name
Date Requested Ship date requested SalesLine.ShippingDateRequested SalesShippingDateRequested
Order Status Sales Order Line Status SalesLine.SalesStatus SalesStatus

 

 

Now create temp table in Visual studio

 

 

 

 

Now double click on table in solution explorer and open it designer mode in center of screen.

Update its Table Type property to InMemory.

Now create each field and update its extended data type as we created in previous step.

 

 

Now next step is report parameters. For this purpose we use Data contract class. In current report we required only one parameter base on Extended Data Type CustAccount. At simplest our data contract class will be look like as follow.

 

[

DataContractAttribute

]

public class AlSaleOrderDC

{

CustAccount custAccount;

 

[

DataMemberAttribute('CustomerAccount')

]

public CustAccount ParmCustAccount(CustAccount _custAccount=custAccount)

{

custAccount = _custAccount;

return custAccount;

 

}

 

}

 

Now we required to write some logic which you above mention class as its data contract and populate the custom temp table we build in pervious step.

[

SRSReportParameterAttribute(classStr(AlSaleOrderDC))

]

public class AlSaleOrderPD extends SRSReportDataProviderBase

{

AlSaleOrderDC dc;

ALSalesOrderTemp salesOrderTemp;

 

 

 

 

[

SRSReportDataSetAttribute('tempSalesOrderDS')

]

public ALSalesOrderTemp gettempSalesOrderDS()

{

select * from salesOrderTemp;

return salesOrderTemp;

}

 

/// </summary>

public void processReport()

{

CustAccount _CustAccount;

SalesLine _SalesLine;

dc =this.parmDataContract();

 

_CustAccount = dc.ParmCustAccount();

 

while select * from _SalesLine where _SalesLine.CustAccount == _CustAccount

{

salesOrderTemp.SalesId = _SalesLine.SalesId;

salesOrderTemp.CustAccount = _SalesLine.CustAccount;

salesOrderTemp.CustName = CustTable::find(   _SalesLine.CustAccount).name();

salesOrderTemp.SalesPrice = _SalesLine.PriceUnit;

salesOrderTemp.ItemId = _SalesLine.ItemId;

salesOrderTemp.ItemGroupId = InventItemGroupItem::findByItemIdLegalEntity( _SalesLine.ItemId).ItemGroupId;

salesOrderTemp.OpenQty = _SalesLine.QtyOrdered;

salesOrderTemp.DateRequested = _SalesLine.ShippingDateRequested;

salesOrderTemp.SalesStatus = _SalesLine.SalesStatus;

salesOrderTemp.insert();

 

}

 

 

}

 

}

At this step build the solution, never forget to check the project Sychronized database on build set to true.

Now Add new report in project

Double click on Report in solution and open in designer screen. And right click on datasets and create new Data Set.

From new data set update the following properties. Data Source Type to Report Data provider. Change Name to DSSales Order

Click on Query and from dialog select the data provider class we create some above screen.

 

After Selecting Class, click on next button. From next dialog select field for usage in report.

 

Now right click on designer node of report and click on precision design.

In precision design, we can create report designer by our need.

 

New designer will be added, rename it and double click to open it. from left pane, toolbar to drag to table to add in designer.

 

From Report Data drop dataset fields on table columns. Add new column in table.

When all fields are added in report. Right click outside the report body and click on report property.

 

And select report print layout. Our target is A4 page. so set it from report properties.

 

Now right click on report body and check its with. Its width must be under 6 because at run time 1 inch on both side must be skip.

After that right click on report in solution explorer and click on deploy

After the add new display menu Item update the its following properties

 

Here there is one advancement, In 2012 there is very difficult to debug report. But in Dynamics 365 for operation is its very simple. Just put break point and set report as starting object and run the project.

 

 

Now new browser window you find similar form.

Now Customer appear because by default it opens in “DAT” legal entity. Now update the url as follow.

https://usnconeboxax1aos.cloud.onebox.dynamics.com/?mi=AlSaleOrderMenu&prt=initial&debug=vs%2CconfirmExit&activityid=041d0eaf-7d60-0000-162d-1d04607dd201&cmp=usmf

 

select parameter from customer. click on ok

And my break open hit

So it is very here to debug report.

 

 

So our report logic fine, but one step is pending Which is report should be run from Client with particular module.

So I decide to add this report in sales and marketing module and under sale order report . For this purpose we have to create a new menu extension.

 

New menu extension added in solution explorer.

Expand menu extension in designer and drag display menu in required menu

From property update “Display In Content Area” to true to create show crumb bar.

Now save and compile again the project.

And open client url in Browser

Login and goes in Sales module For identification purpose, I set the label of display menu as “Ali Sale Order”.

Click on it find report parameter dialog

 

So our report is running successfully.

{ 0 comments }

Yesterday I face a problem; some Ledger journal records are stuck into Workflow. In Error message, described about issues in  customization. In the after last deployment code full cil was not generated. So first step is full Cil generation.

For resubmit these pending records, I used the code snippet delivered on Microsoft Forum by Dick wenning. It help me to resolve ledgers records.

https://community.dynamics.com/ax/f/33/t/77311


WorkflowTrackingStatusTable WorkflowTrackingStatusTable;

while select WorkflowTrackingStatusTable where WorkflowTrackingStatusTable.TrackingStatus == WorkflowTrackingStatus::Faulted &&

WorkflowTrackingStatusTable.WorkflowType == WorkflowTrackingStatusWorkflowType::Workflow

{

Workflow::resumeWorkflow(WorkflowTrackingStatusTable.CorrelationId);

}

 

I updated the code snippet based on reci id instead of all faulted records.

 


WorkflowTrackingStatusTable WorkflowTrackingStatusTable;

 

select * from WorkflowTrackingStatusTable where WorkflowTrackingStatusTable.RecId ==5637166344;

    if (WorkflowTrackingStatusTable!=null)

{

Workflow::resumeWorkflow(WorkflowTrackingStatusTable.CorrelationId);

 

}

 

 

 

 

You can get recid from workflow history screen.

But one record remains unrecoverable. For this I explored tables  as follow.

If we explore workflow tables, you find that main player tables are

SysWorkflowTable

WorkflowTrackingStatusTable

WorkflowTrackingTable

 

In workflowTrackingStatusTable ContexttableId feild contains the table id of ledgerjournaltable and contextrecid contains the records recid of ledgerjoural row on workflow is applied.

SysWorkflowTable correlation id is key relation between Sysworkflow.

 

 

In current scenario, when all records are recovered, but one record is not recoverable. The follow these steps, but you can use them but your own risk.

 

  • Get recid from workflowTrackstatusTable from workflow history. Or Use contextrecid of LedgerJournalTable.
  • Sql Query on workflowtrackingSTatusTable and get correlationId.
  • Query on SysworkflowTable workflowcorrelationid and get the reference sysworkflow table and get reference id
  • Query on Select WorkflowTrackingTable workflowTrackingTable.WORKFLOWTRACKINGSTATUSTABLE Which is based on recid of workflowTrackStatusTable.
  • Delete the records based on reference and reset the ledgerJournaltable status to draft.

 

For your reference I used following Select query.

select from WorkflowTrackingStatusTable where CONTEXTRECID =5637239972

select * from WorkflowTrackingTable where WorkflowTrackingTable.WORKFLOWTRACKINGSTATUSTABLE =5637166344

select * from SysWorkflowTable where workflowcorrelationid =’D4AF23DF-9CC1-40F9-B886-DAB1CD6B35DE’

 

update LEDGERJOURNALTABLE set WORKFLOWAPPROVALSTATUS=1 where lEDGERJOURNALTABLE.JOURNALNUM =’xyze’

 

{ 0 comments }

During project build process following operations are performing. All these operations are one by one after each other.

  1. Metadata and X++ code validation.
  2. Best practice checks.
  3. Report RDL Generation
  4. Compilation and creating .Net assembly.
  5. Label and resource file generation.
  6. Database Synchronization.

 

{ 0 comments }

Following are some recommendation.

  • Using Camel casing.  Variable name must be in camel Case for example table buffer for CustTable must be similar custTable.
  • Avoid keyword. Avoid system keywords.
  • Company name of  Prefix with company name or project,  For example if my company name with Al then all custom table, Custom form, Extended data Type, enum must be start with al suppose.  AlFileInstallmentSchedule, AlCustTable. table.
  • Maintaining consistency, throughout the customization prefix used are consistence, so elements are easily locate.
{ 0 comments }