Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
This blog post describes an new way of interacting synchronously from code with theConstraint-Based Product Configurator which has been introduced in MicrosoftDynamics AX 2012 R3 CU8.
The scenario that drove the introduction of this feature can be described as follows:
An external 3rd party sales configurator outside of Microsoft Dynamics AX 2012 is used toassign values to a subset of attributes(a partially configured order), fromwhich the remaining mandatory attributes can have their values deduced usingthe Microsoft Dynamics AX 2012 Configurator, thereby completing the order.
Once the all the values have been deduced, assuming all values are valid, they can be passed onto the back end configuration module, which will create the BOM and potentiallythe Route (if the model has a Route).
Included in Microsoft Dynamics AX 2012 R3 CU 8 is a new derived version of the PCRuntimeConfigurator class, named PCRuntimeSynchronousConfigurator.
This class is designed, as the name indicates, for synchronous interaction with the .NETConfigurator component.
The configure method on the class is the methodwhich exposes the new functionality added to the .NET Configurator to Xpp. Themethod takes three arguments; the model as xml, the attribute assignments asxml and a the number of milliseconds which can be used before a timeout occur.The return of the method is a IsConfigurationComplete enum value, from whichresult of the configuration can be determined;
The PCRuntimeSynchronuosConfigurator class exposesthe functionality required by the .NET configurator component to support theabove scenario but it is not yet integrated with any order (sales, productionetc) or product variant creation nor is it integrated with the BOM and Routegeneration.
KB Article with number 3028719 should be Applied on top of R3 CU 8 as it addresses a stability issue in the solution.
In this example values are passed from the simulated 3rd party configurator into Dynamics AX 2012 through a web service, as illustrated below:
To expose the PCRuntimeSynchronousConfigurator class througha web service, we start by introducing a new classPCTechDemoService which implements a method with the SysEntryPointAttribute code attribute, which isneeded for a method to be exposed as a web service.
In this simple implementation the example method looks like this:
public boolean configure(PCName _modelName, str _xmlValues)
PCRuntimeSynchronousConfigurator configurator = PCRuntimeSynchronousConfigurator::construct();
PCProductConfigurationModel productConfigurationModel = PCProductConfigurationModel::findByName(_modelName);
values = '<Assignments>' + _xmlValues + '</Assignments>';
if(configurator.configure(productConfigurationModel.getXML(), values,120000) == Microsoft.Dynamics.Ax.Frameworks.Controls.ProductConfiguration.IsConfigurationComplete::Complete)
ret = true;
Now we can create a Service in the AOT which uses the PCTechDemoServiceclass and its configure method as an operation. To use this service, it needsto be put in a service group, which can then be deployed.
To test the service, navigate to System administration > Services and Application Integration Framework > Inbound ports. Here we find our new PCTechDemoServiceGroup, copy the WSDL URI value.
Open Visual Studio Command prompt and type:
Wcftestclient <Your WSDL URI>
This will open the WCF test client where we can now see our web service.
For the demo data set I have used, I will use the following argument values
_modelName : 20001
_xmlValues : <Assignment xPath="powerCableLength" value="10"/><Assignment xPath="videoSystem/television/size" value="42" />
Note: the xPath mechanism used to identify the attributes in model.
If you are familiar with the 20001(Home theater system) model, you will know that it has just twomandatory attributes which are not assigned by defaults; the powerCableLengthon the root component and the size on the television component.
Attached you will find an Xpp project with code used for the example.
Business Applications communities