cXML Purchase Send – Reviewing Data Errors
cXML Purchase Order Request Send AX2012 R3 V1
cXML Purchase Send – Merge objects overview
SharePoint Online Integration with Dynamics 365 for Operation (D365FO) Upload File / Create Folder
This blog will explain how to create files and folders on SharePoint Online programmatically, using AX7 code (Dynamics 365 for Operations).
FILE CREATION:
- Library to use: Microsoft.Dynamics.AX.Framework.FileManagement
To save file, SharePointDocumentStorageProvider class should be used:
System.UriBuilder builder = new System.UriBuilder(SITE); str host = builder.Host; str extId = xUserInfo::getExternalId(); SharePointDocumentStorageProvider storageProvider = new SharePointDocumentStorageProvider(host, SITE, FOLDER_PATH, extId); //Create MemoryStream object that will hold data to upload System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(); //Populate memoryStream with your file’s contents. //In the end set the position of the stream to 0 memoryStream.Position = 0; //Method SaveFile is used to create the file on SharePoint online storageProvider.SaveFile(newGuid(), NAME_OF_FILE, MIME_TYPE, memoryStream);
FOLDER CREATION:
- Library to use (D365FO): Microsoft.Dynamics.Platform.Integration.SharePoint
To create folders on SharePoint, we need access token. It can be obtained in the following way:
System.UriBuilder builder = new System.UriBuilder(SITE_ADDRESS); str host = builder.Host; str extId = xUserInfo::getExternalId(); ISharePointProxy proxy = SharePointHelper::CreateProxy(host, '/', extId); str token = proxy.AccessToken;
Access token should be passed to the following C# method:
public static ClientContext GetClientContextWithAccessToken(string targetUrl, string accessToken) { Uri targetUri = new Uri(targetUrl); ClientContext clientContext = new ClientContext(targetUrl); clientContext.AuthenticationMode = ClientAuthenticationMode.Anonymous; clientContext.FormDigestHandlingEnabled = false; clientContext.ExecutingWebRequest += delegate (object oSender, WebRequestEventArgs webRequestEventArgs) { webRequestEventArgs.WebRequestExecutor.RequestHeaders["Authorization"] ="Bearer " + accessToken; }; return clientContext; }
Method is taken from:
http://www.herlitz.nu/2012/12/30/sharepoint-2013-tokenhelper-cs-source-code/
We don’t need the whole class, just this method.
Library to use (C#): Microsoft.SharePoint.Client
- After getting the ClientContext object from GetClientContextWithAccessToken method, we can use it to create folders (purely C# code from now on, not explained in this blog).
The post SharePoint Online Integration with Dynamics 365 for Operation (D365FO) Upload File / Create Folder appeared first on Merit Solutions.
Experiences Developing SSRS Reports in Dynamics 365 for Operations
A few years back, I wrote a similar blog post on developing reports in AX2012. Well, here we are now looking at reports in Dynamics 365 for Operations (AX7), and again I thought I would share my experiences. I started by … Continue reading
The post Experiences Developing SSRS Reports in Dynamics 365 for Operations appeared first on K3 Technical Blog.
Render report to memory stream D365 (aka AX7)
Recently I was tasked with an upgrade of a functionality we have on AX2012 to Dynamics365, which includes running the report from the code and attaching it to the caller record. As you are probably aware of, this was very easy to accomplish in the earlier Microsoft Dynamics AX versions, where you could simply run the report to a file, save it locally and attach it to the record using the DocuActionArchive class.
Things are a bit more complicated when it comes to D365 in cloud. You are no longer able to save the file locally (for example using System.IO.Path::GetTempPath() + fileName) as storage is now moved to Azure and files are stored as a Blob. You may have also noticed that most of the classes that work with files now use stream objects with their content type instead.
In order to attach the report to a record I needed to provide a MemoryStream object which would represent my report. As I found no existing code that could provide me with the memory stream output of the report I created my own method to do this. Below is given a code (runnable class – job) to perform rendering of a report to a memory stream.
class RunReportToStream { public static void main(Args _args) { DocuRef addedRecord; ProdTable prodTable = ProdTable::find('P000173'); Filename fileName = "AbcTest.pdf"; YourReportController controller = new YourReportController(); YourReportContract contract = new YourReportContract(); SRSPrintDestinationSettings settings; Array arrayFiles; System.Byte[] reportBytes = new System.Byte[0](); SRSProxy srsProxy; SRSReportRunService srsReportRunService = new SrsReportRunService(); Microsoft.Dynamics.AX.Framework.Reporting.Shared.ReportingService.ParameterValue[] parameterValueArray; Map reportParametersMap; SRSReportExecutionInfo executionInfo = new SRSReportExecutionInfo(); ; _args = new Args(); _args.record(prodTable); // Provide all the parameters to a contract contract.parmProdId('P000173'); contract.parmNumberOfLabels(1); // Provide details to controller and add contract controller.parmArgs(_args); controller.parmReportName(ssrsReportStr(YourReportName, DesignName)); controller.parmShowDialog(false); controller.parmLoadFromSysLastValue(false); controller.parmReportContract().parmRdpContract(contract); // Provide printer settings settings = controller.parmReportContract().parmPrintSettings(); settings.printMediumType(SRSPrintMediumType::File); settings.fileName(fileName); settings.fileFormat(SRSReportFileFormat::PDF); // Below is a part of code responsible for rendering the report controller.parmReportContract().parmReportServerConfig(SRSConfiguration::getDefaultServerConfiguration()); controller.parmReportContract().parmReportExecutionInfo(executionInfo); srsReportRunService.getReportDataContract(controller.parmreportcontract().parmReportName()); srsReportRunService.preRunReport(controller.parmreportcontract()); reportParametersMap = srsReportRunService.createParamMapFromContract(controller.parmReportContract()); parameterValueArray = SrsReportRunUtil::getParameterValueArray(reportParametersMap); srsProxy = SRSProxy::constructWithConfiguration(controller.parmReportContract().parmReportServerConfig()); // Actual rendering to byte array reportBytes = srsproxy.renderReportToByteArray(controller.parmreportcontract().parmreportpath(), parameterValueArray, settings.fileFormat(), settings.deviceinfo()); if (reportBytes) { // Converting byte array to memory stream System.IO.MemoryStream stream = new System.IO.MemoryStream(reportBytes); // Upload file to temp storage and direct the browser to the file URL File::SendFileToUser(stream, settings.parmFileName()); stream.Position = 0; str fileContentType = System.Web.MimeMapping::GetMimeMapping(fileName); // Attach the file to a record using stream object addedRecord = DocumentManagement::attachFile(prodTable.TableId,prodTable.RecId,prodTable.DataAreaId, 'File', stream, fileName, fileContentType,"PDF file attached"); } // You can also convert the report Bytes into an xpp BinData object if needed container binData; Binary binaryData; System.IO.MemoryStream mstream = new System.IO.MemoryStream(reportBytes); binaryData = Binary::constructFromMemoryStream(mstream); if(binaryData) { binData = binaryData.getContainer(); } } }
With the output found in the code above like reportBytes, stream and binData you can do many things, like sending the report to a certain SharePoint location from code, sending the report as an email attachment from code, attaching the report to a record as a document attachment from code and I am sure that you will find many other usages.
I hope that you will find this text helpful.
The post Render report to memory stream D365 (aka AX7) appeared first on Merit Solutions.
DAXDUTIL – AX7 Updated
Hi all,
Just started to developer into AX7. Hating and loving it. I`m keeping this subject to another post though.
For the moment, let’s talk about DAX Development Util repository.
The folder directory has been updated to hold also content for our fellow consultants.
There are 2 new folders:
- Exams: Contains AX7 exams hints
- Snippets: Contains snippets files to be used on VS during X++ development.
Obviously, you are more then welcome to contribute!
Just send a pull request or a message at anderson@joyle.com.br.
[]’s
Anderson Joyle
RFQ Scoring method
Top IT factors for a strong dealer management strategy
We’d like to talk briefly about the need for equipment driven companies to open new revenue streams. It’s a given that organizations can only thrive if they find ways to connect with customers, suppliers, and employees across multiple channels and locations. “Apps, sites, and portals” are a fact of daily business.
Along with opening new channels, equipment manufacturers and equipment rental and services companies at larger-scale changes. One is adding direct dealership to their business model. If you get the right IT platform in place, selling to customers and partners can fold into your current organization.
Top IT factors for a strong dealer management strategy
The best ERP systems today are built with an understanding that while ERP is the heart of every organization, it needs to accommodate myriad technology innovations and industry-specific requirements. One reason that ERP systems like Microsoft Dynamics 365 and Microsoft Dynamics AX offer compelling choices is that they’re friendly to ISV industry solutions and do put cloud and mobile technologies first. Why this is important if you’re looking to implement a dealer management strategy:
- Dealer management requires a big matrix of integrations—to start, between manufacturers and suppliers and your back office. You’ll need interfaces and process automation that collect and organize massive amounts of information about production, delivery, contracts, financials, and more.
- Dealers also need to jump into data-driven business models that let them work with customers, employees, equipment, and partners via apps, portals, IoT devices, and other cloud-based innovations. This is especially important for equipment-driven industries and dealer models. Selling, service, equipment analytics, transport, customer communications—we’re moving into a digital landscape where both dealers and customers can manage end-to-end cycles via mobility and the cloud.
- Dealers will work with the same technologies and capabilities regardless their industry, though what construction dealers need and car dealers need from those technologies differ. From our perspective, it’s important that your dealer management solution be expansive, flexible, and easily adaptable to industry-specific requirements. You need to be confident that both your ERP provider and ISVs have the right balance of industry and IT knowledge, and that you don’t get locked out of functionality that you may not use today but might tomorrow.
The 3 points above can start your IT conversation about what you want in a dealer management strategy. You need ERP that’s built on an open platform and designed to welcome ISV capabilities. You want to keep your IT as clean as possible, so look for a solutions set that offers pretty much endless ability to connect your back office, third parties, customers via interfaces, apps, and portals. Make sure that you can define and configure any functionality you need now for your specific industry, and perhaps most important, make sure that your providers have built in the ability to move with dealer market trends. We don’t know everything that’s coming, but if you’re going to plan for your future, it’s good to know that your software is one step ahead of yo.
Download our latest factsheet about Equipment Management for Microsoft Dynamics
Image 1: Why HiGH Software can yelp you with the Top IT factors for a strong dealer management strategy
Intrigued? Learn more about DynaRent for Dynamics 365 Operations. We encourage you to email info@highsoftware.com for a custom demo of our solution.
Microsoft Dynamics Partner Roundup: Unified commerce payments; Food industry NAV win; New ERP consultancy; CPQ vendor performance
Why you should be using Team Foundation Server for Dynamics AX lifecycle management?
Credit memo functionality on Dynamics 365 MPOS
Credit memo functionality on Dynamics 365 MPOS
Steps (please find the document with screenshots attached credit-memo-functionality-on-dynamics-365-mpos).
1.Set up Payment method with the Operation name ‘Pay credit memo’ and associate appropriate Posting accounts in it
Retail and commerce/Channels/Retail stores/All retail stores/select the store HOUSTON/Tab Set up/Payment methods/in our case it is called Voucher:
2.Issue Credit Memo
Go to MPOS/Show journal/select sale transaction/ Select Return transaction/Return/select Products/Return/select Reason for return/OK.
Go to Actions/Transaction options/Issue credit memo:
Credit memo will be issued and transaction will be posted.
3.Now we can check if credit memo has been issued
Retail and commerce/Channels/Retail stores/Credit memos:
Credit memo is issued with the number 1.
4.Apply Credit memo
Enter Sales Transaction in MPOS and then pay it using the Payment method ‘Voucher’ (which has an Operation name ‘Pay credit memo’):
Enter Credit memo number 1 (the number we see in step 3):
Click Check amount, we see Available amount:
Click the button on bottom ‘Tender Payment’:
5.Now we can check if Credit memo has been applied
Retail and commerce/Channels/Retail stores/Credit memos:
You will notice that Applied check box is now marked, Applied amount and Applied date are filled in.
DynamicsPerf 2.0 Setting Up Security for Remote Collection
Microsoft Dynamics 365 vs NetSuite White Paper
Has your organization outgrown NetSuite? Or are you considering implementing a new cloud ERP solution?
If so, we invite you to read our new white paper: Microsoft Dynamics 365 vs NetSuite: A Clash of the Clouds.
Nucleus Research’s ERP Technology Value Matrix 2016 reflects a much larger shift to the cloud than in years past with vendors making large investments in cloud offerings – with mobile functionality, internet of things (IoT), and embedded analytics as table stakes.
This white paper looks at two cloud-based solutions designed to meet the needs of today’s rapidly evolving enterprises – Microsoft Dynamics 365 and NetSuite. It highlights why growing organizations should invest in a platform they can grow into – instead of outgrow in 3 to 5 years. And it discusses how organizations can implement Tier 1 cloud ERP with less time, spend, and risk.
Register now and read this white paper for free: Microsoft Dynamics 365 vs NetSuite.
The post Microsoft Dynamics 365 vs NetSuite White Paper appeared first on Merit Solutions.
Dynamics AX 2012 R3 Troubleshoot Error Duplicate request to load user role mappings detected - KB 3158762
Issue:
For one of my client who is on AX 2012 R3 CU8, We started getting this error on 2 of our PROD AOS Event Viewer - "Duplicate request to load user mappings detected"
Fix:
After some initial troubleshooting, found out this binary hotfix in LCS, which fixes the following issue
https://fix.lcs.dynamics.com/Issue/Resolved/1118984?kb=3158762&bugId=3747718&qc=c33425bb1af0b37d6b1bdb5479e6693e13172c3a728756035b530422e296d3a8
Once you download the hotfix, just run it using the AXUpdateInstaller. It takes few mins depending on your AOS topology and servers to run this update.
Word of caution - As with any hotix (be it application or binary, always test on your TEST instances and leave it running for couple of weeks, monitor and only then deploy the hotfix to your PROD)
Notes form the hotfix description in LCS:
Microsoft Dynamics 365 vs NetSuite White Paper by Merit solutions

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.
Voucher not specified as of … Dynamics Ax 2012 R3
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
selectfirstOnly numSeqTable
where numSeqTable.RecId == ledgerJournalName.NumberSequenceTable;
if (numSeqTable)
{
numberseq = numberseq::newGetVoucherFromCode(numSeqTable.NumberSequence);
trans.parmVoucher( numberseq.voucher());
}
Now customization works perfectly fine.
Microsoft Dynamics 365 for Operations - Number sequence
[SubscribesTo(Classstr(NumberSeqGlobal), delegateStr(NumberSeqGlobal, buildModulesMapDelegate))]
staticvoid buildModulesMapSubscriber(Map _numberSeqModuleNamesMap)
{
NumberSeqGlobal::addModuleToMap(classNum(NumberSeqModuleMyModule), _numberSeqModuleNamesMap);
}
Product Master Release in Batch.
Don’t Let Fast Growth Impact Profits or Productivity
After years of securing investors, performing product design and testing, and submitting documents to the FDA, many life sciences organizations suddenly find themselves in a period of fast growth after receiving FDA approval. Product approvals force pharmaceutical, biotech and medical device manufacturers into the next phase, which is manufacturing high quality products quickly, efficiently and profitably. Life sciences organizations can manage the entire process, from start to finish, by replacing inefficient business systems with a more modern management solution.
Change can happen, literally overnight, at many life sciences organizations. After receiving FDA approval, you need to jump into action setting up manufacturing operations to get your innovative new product into the marketplace as soon as possible. As discussed in “Life Sciences: 6 Ways to Thrive in a Digital Future,” an eBook, being prepared for strong, fast growth after approval is no small task. Replace entry-level or niche systems with a business management solution that can streamline the transition from the research and development phase to production and sales.
Support Innovation and Drive Growth with MAXLife
A single, integrated enterprise resource planning (ERP) solution, like MAXLife, can simplify operations, improve compliance and reporting at each phase of the business, and support innovation and growth through business change. This centralized solution, designed specifically for the unique needs of life sciences organizations, makes it easier for your team to enter, access and use data from across operations and throughout the product lifecycle. Time-saving automations, like workflows and dashboards, streamline common activities and highlight data needed to perform tasks productively. Quick access to reliable data encourages collaboration amongst employees and throughout the supply chain. Your team can expedite product development with efficient manufacturing processes; getting products to market faster, driving profits and business growth.
MAXLife offers early-stage businesses the opportunity to establish strong quality assurance and CAPA processes from the very start. As operations change, like they often do after FDA approval, MAXLife will remain aligned with business needs and goals, unlike common niche systems such as QuickBooks. A cloud-based solution can also be deployed faster than traditional on-premises software and without the hefty price tags of other common ERP solutions, like Oracle or SAP, used by many in-market organizations.
Integrate your people, processes and data with an innovative ERP solution and maintain control over business operations through periods of fast growth. Download the eBook and contact Merit Solutions for more information on increasing productivity and profit with MAXLife.
By Merit Solutions, a Global Microsoft Partner and Business Process Consultant
The post Don’t Let Fast Growth Impact Profits or Productivity appeared first on Merit Solutions.