Month: February 2015

What if you need to integrate a Retail E-Commerce website with the powerful Dynamics AX ERP at backend to leverage numerous functional capabilities it offers in the areas like but not limited to Supply Chain Management. Then you are reading the right blog post! We can achieve it through exposing custom AIF services as web services on IIS using enhanced inbound ports via HTTP adapter. In this post, we’ll expose customers data in Dynamics AX 2012 persisted in CustTable to an external interface using web services.

To simplify things, we’ll create a read service operation and then test our custom AIF service exposed as a web service using .Net console application. Although this blog post uses C# consumer to consume the custom service but the same service can be consumed by any website development platforms like ASP.NET and the possibilities are limitless!

Getting ReferenceGroup control automatically while dragging a datasource field to a form control is little tricky. Even if you have defined relations correctly at the table level, you might not always get the reference group control for a foreign key in the table. See the solution below for this issue.

Problem:

Consider for example, two tables:

1. FAZCourseTable
2. FAZEnrollmentTable

where FAZEnrollmentTable contains the foreign key of FAZCourseTable as follows:

But when I drag this foreign key field from datasource to grid control, I get Int64Edit control instead of ReferenceGroup control.

Resolution:

To get the ReferenceGroup control, perform the following development steps:

1. Create unique index on FAZCourseTable for the natural key of the table which in this case is Code field.
2. Set AllowDuplicates to No on the index properties.
3. Set AlternateKey to Yes on the index properties.

4. Set ReplacementKey to CodeIdx, name of the index just created, on the table properties.

5. Delete the Int64Edit control created earlier on the form.
6. Drag the FAZCourseTable field from the datasource to the grid control node.
7. You should be getting the ReferenceGroup control now.