Skip to main content

Posts

Showing posts from September, 2013

how to delete duplicate records through ax 2012

To Delete duplicate records  from salesTable or any other table through ax 2012 by x++ code you can write code in Ax job. Set fieldSet = new set(Types::Integer); DictIndex IndexName = new DictIndex( tablenum(SalesTable), indexnum(SalesTable,SalesIdx)); int i; ; if(IndexName.numberOfFields()) { for(i=1;i<=IndexName.numberOfFields();i++) { fieldSet.add(IndexName.field(i)); } ReleaseUpdateDB::indexAllowDup(IndexName); ReleaseUpdateDB::deleteDuplicatesUsingIds(tablenum(SalesTable),0, fieldSet); ReleaseUpdateDB::indexAllowNoDup(IndexName); } info("Duplicate records deleted successfully");

Calling a SSRS Report from x++ in Ax 2012

For Calling a SSRS Report from x++ in Ax 2012 you can try following code hints. You can use SrsReportRunController  class to call SSRS Report. SrsReportRunController controller; controller = new SrsReportRunController(); controller.parmReportName(ssrsReportStr(TestReport, Detail)); controller.startOperation();

Link for Simple UI Builder Class in SSRS Report in AX 2012

This UI Builder class is a class help you to customize your dialog which pop ups when you open a Report. UI Builder Class also  helps you to add run time lookups and other controls like combobox,textbox,checkboxes etc on the dialog form. I want to share import Link for Simple UI Builder Class in SSRS Report in AX 2012 . http://kdynamics.blogspot.in/2013/09/simple-ui-builder-class-in-ssrs-report.html

Link to Preview the Upcoming Warehousing and Transportation Capabilities for Microsoft Dynamics AX2012 at AXUG Summit 2013

Preview the Upcoming Warehousing & Transportation Capabilities for Microsoft Dynamics AX2012 at AXUG Summit 2013 Note that these upcoming capabilities will be release in AX 2012 R3 which is expected to be released at the end of this year. Preview the Upcoming Warehousing & Transportation Capabilities for Microsoft Dynamics AX2012 at AXUG Summit 2013

Code to args class implementation in Ax 2012

Write code in button click void clicked() { Args args = new Args(); ; args.caller(this); args.parm("Hi"); args.parmEnumType(Enumnum(Test)); args.parmEnum(Test::T); args.record(calling); new MenuFunction(MenuItemDisplayStr(CallerMI),MenuItemType::Display).run(Args); } Code Written in Init of Caller Object public void init() { Calling calling; ; super(); info(element.args().parm()); info(element.args().parmEnum()); calling = element.args().record(); info(Calling.Name); }

Find or Update customer primary Address in Ax 2012

To Find or Update customer primary Address in Ax 2012 you can try following code. Relation between dirpartytable and custtable slightly changed in Ax 2012 so you need to re-learn about this. LogisticsPostalAddress address; custtable = Custtable::find("C00001"); address.Street = "abc"; address.ZipCode = "280003"; address.City = "Mumbai"; addressView.Party = CustTable.Party; addressview.initFromPostalAddress(address); DirParty = DirParty::constructFromPartyRecId(CustTable.Party); roles = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Delivery).RecId]; DirParty.createOrUpdatePostalAddress(addressView,roles) Note: createOrUpdatePostalAddress method is useful for both creating or updating the customer address. if you are providing the existing dirpartyid then it will update the customer address ,in case of new dirpartyid it will create a new address.