Quantcast
Channel: Microsoft Dynamics AX
Viewing all 131213 articles
Browse latest View live

Forum Post: Get Ledger Account from accounting distribution using x++ ? Path > Pending Vendor Invoices > Account Distribution > Ledger Account Field

$
0
0
Hello - I have a custom Pending Vendor Invoice's list page. All the lines for each Invoice is listed on this list page. I need to add an extra column "Ledger Account" on this list page which will have ledger account numbers which can be unique for every invoice line. We can find the Ledger Account field in view Distributions under Accounting on Vendor Invoice Line View Action Pane on the top left of the screen. I need to retrieve this Ledger Account Field and Link it to the lines listed on pending vendor invoice list page. How can I achieve this ? I believe maybe these ledger accounts are linked with invoice numbers and items. Any help about the tables involved, relations, dimension classes, X++ code snippets etc will be extremely helpful. Thank You

Forum Post: RE: New editable Drop Down box for Approved Vendors form

$
0
0
Hi Dumindu , Here are some links which will help you to understand how to write Edit method. msdax.blogspot.com/.../how-to-write-edit-method.html msdn.microsoft.com/.../aa637541.aspx

Forum Post: RE: Best Practice to Migrate Data

$
0
0
Are you doing upgrade. Isn't upgrade toll going to upgrade data for you if you are doing upgrade ? Anyways DIXF is best to import data in AX 2012, We used it extensively in Ax 2012 implementations for data migration, so I would recommend go with DIXF.

Forum Post: RE: Best Practice to Migrate Data

$
0
0
There is no one tool that can be useful for all the situations so use different tools depending on the type of data. Here is the link that discuss different Data Migration Approaches. axninja.blogspot.com/.../data-migration-approaches-for-dynamics.html

Forum Post: RE: Access Denied: MCRInventSearchController

$
0
0
This does the trick. In AOT > Open Classes > Find MCRInventSearch (misleading because the error references MCRInventSearchController) > Expand the Class > Drag and Drop the updateReleasedProducts method to your Privilege in the Permissions - ServerMethods node. Same method as Dennis and DdynamicsAX - Thanks for the help!

Forum Post: Vendor Rebate - Recalculate

$
0
0
Hi, Let's say I have 3 Rebate IDs (1,2,3) where the status is 'calculated' in the vendor rebates form. When I run my next time calculation, AX process it for the Rebate ID 4, 5, 6, 7 ignoring the previous Rebate IDs 1,2,3 (because they have a 'calculated status') I want to be able to have the option then when to Undo the calculated status on ID 1,2,3 and let it start from ID 1 to ID 7. Is there a function that I missed in the rebate calculation? Thanks

Forum Post: RE: how to see the cost price in the inventory counting journal?

$
0
0
Thanks Ludwig, this is the steps that I follow: stock management>journal > count> New

Forum Post: SalesLine enable checkbox

$
0
0
Dear All, I have a checkbox in salesline, i need to enable the checkbox based on role and on selecting the checkbox i need to allow edit the salesprice, but the checkbox is not getting enabled unless i save the line. please assist me. Thanks and Regards, Selva

Forum Post: RE: Send SSRS report as an email attachment with message body from email template in dynamics 365

$
0
0
Hi Kedarnath, You can use Report controller to generate report and save it in archive . Read it from Report Archive and then convert it in to memory stream and then use SysMailerMessageBuilder to send it in a email . you can use SetFrom method of the same class to set sender. Refer below code DocuRef docuRef; select firstonly forupdate docuRef where docuRef.RefRecId == PrintJobHeader.RecId && docuRef.RefTableId == tableNum(PrintJobHeader) && docuRef.TypeId == #SRSArchiveDocument; DocuValue docuValue; select firstonly forupdate docuValue where docuValue.RecId == docuRef.ValueRecId; container reportBytes = docuValue.File; System.Byte[] binData; System.IO.Stream stream; // Turn the Bytes into a stream for(int i = 0; i < conLen(reportBytes); i++) { binData = conPeek(reportBytes,i+1); stream = new System.IO.MemoryStream(binData); } var messageBuilder = new SysMailerMessageBuilder(); messageBuilder.addTo(sendToEmail) .setSubject(Subject) .setBody(Body) .addCC(HcmWorker::find(ccEmail).email()); if (sendFromEmail) { messageBuilder.setFrom(sendFromEmail); } if (stream != null) { messageBuilder.addAttachment( stream, 'Report'.pdf'); } SysMailerFactory::sendInteractive(messageBuilder.getMessage());

Forum Post: RE: Wrong planned transfer order start date

$
0
0
That application version is the same as the one I have used. I have copied the settings you defined and I have no issue, it works as expected, no action messages, no future messages. However your plan screen shots are not from that version, you are missing one element. The field does not matter, but I would question your screen shot and version combination here, your screen shot for the second half of the plan is also not a follow on from the first, but the data does not matter for your issue. I suggest checking the calendar setup against your coverage group or warehouse, it is understanding why it is delayed when you have stock and the means to make it - the calendar for the lead time is the only thing I can think of.

Forum Post: RE: AOS crashes on the Development box

$
0
0
The UAT environment is fine, no issue there. So I exported all my projects. Then loaded the modelstore that was loaded into the UAT environment, to the DEV environment. DEv was also refreshed with the data in the UAT as well as the configuration keys file. Even though the modelstore has all the compiled code, I still did a full compile on DEV and a full CIL. I also synchronized the database. I went to File -> Tools -> Options -> Development Tab and unchecked the "Execute business operations in CIL". Then I created a sales order for customer 10003 and itemID 100005 without adding my userId to a call centre. It worked, no problem. Then I added my userID to a call centre so that I can be a retail user and created another salesorder for the same customer and itemID. The moment I entered the itemID AX took a while to do its background thing, but instead of populating the default quantity and unit price on the line, the AOS crashed. So it runs the exact same code and data and configuration keys as the UAt environment, but still crash the AOs while none of it happens in the UAT environment. I did clear my usage data. I restarted the AOS, went back to File -> Tools -> Options -> Development Tab and checked the "Execute business operations in CIL". I added a new sales order as a retail user and there was a bit of a delay but it did populate the line with the default quantity etc. So, I should be able to run the code without CIL but it clearly doesn't like it. Does speed on a server has anything to with the crash seeing that it takes longer to populate the line if it runs outside of CIL? If so, what is the minimum specs we need for the DEV server to work correctly? Our DEV server is slower than the UAT server.

Forum Post: RE: Deleting work orders that are cancelled

$
0
0
Reset the status to created and then delete them.

Blog Post: D365FO Send Report as email attachment

$
0
0
Hi All , Usually in any implementation project we get request to send Report as a attachment in email. Below is code going to help you to send report as an email attachment. In the below code I am saving report in report archive(DocuRef table ) reading it from DocuRef table in to bytes and converting it in to memory stream. The memory stream is further I am going to use to send an email with Subject and body using SysMailerMessageBuilder class. You can use following methods of this class setSubject - To set Subject of the email. setBody - To Set email body . setFrom - To set sender of the email. sendInteractive - To send interactively. sendNonInteractive - TO send non interactively Args args; SalesInvoiceContract salesInvoiceContract; CustInvoiceJour custInvoiceJourLocal; SRSPrintDestinationSettings SRSPrintDestinationSettings; #SRSFramework body = "Hello, Please find the attached report. Please review and take necessary actions. Regards, AX Support Team "; args = new Args(); select firstOnly custInvoiceJourLocal where custInvoiceJourLocal.InvoiceId == caaTrustFollowUpInvoices.InvoiceId; args.record(custInvoiceJourLocal); SrsReportRunController salesInvoiceController = new SrsReportRunController(); salesInvoiceController.parmArgs(args); salesInvoiceController.parmReportName(PrintMgmtDocType::construct(PrintMgmtDocumentType::SalesOrderInvoice).getDefaultReportFormat()); salesInvoiceController.parmShowDialog(false); salesInvoiceController.parmLoadFromSysLastValue(false); salesInvoiceContract = salesInvoiceController.parmReportContract().parmRdpContract(); salesInvoiceContract.parmRecordId(custInvoiceJourLocal.RecId); // Record id must be passed otherwise the report will be empty SrsReportDataContract srsReportDataContract = salesInvoiceController.parmReportContract(); //srsReportDataContract.parmisMemoryStreamOnly(true); salesInvoiceController.parmReportContract(srsReportDataContract); SRSPrintDestinationSettings = new SRSPrintDestinationSettings(); SRSPrintDestinationSettings.overridePrintContractSettings(true); SRSPrintDestinationSettings.printMediumType(SRSPrintMediumType::Archive); SRSPrintDestinationSettings.parmOverwriteFileIsSet(true); SRSPrintDestinationSettings.fileFormat(SRSReportFileFormat::PDF); SRSPrintArchiveContract SRSPrintArchiveContract = new SRSPrintArchiveContract(SRSReportFileFormat::PDF); SRSPrintDestinationSettings.parmSRSPrintArchiveContract(SRSPrintArchiveContract); str archiveName = strFmt("%1-%2", curUserId(), timeNow()); salesInvoiceController.parmReportContract().parmReportCaption(archiveName);//**This is the "Description" field in the archive salesInvoiceController.parmReportContract().parmPrintSettings(SRSPrintDestinationSettings); salesInvoiceController.run(); PrintJobHeader printJobHeader; select firstonly forupdate printJobHeader where printJobHeader.jobDescription == archiveName; DocuRef docuRef; select firstonly forupdate docuRef where docuRef.RefRecId == PrintJobHeader.RecId && docuRef.RefTableId == tableNum(PrintJobHeader) && docuRef.TypeId == #SRSArchiveDocument; DocuValue docuValue; select firstonly forupdate docuValue where docuValue.RecId == docuRef.ValueRecId; container reportBytes = docuValue.File; System.Byte[] binData; System.IO.Stream stream; // Turn the Bytes into a stream for(int i = 0; i < conLen(reportBytes); i++) { binData = conPeek(reportBytes,i+1); stream = new System.IO.MemoryStream(binData); } ttsbegin; printJobHeader.delete(); docuRef.delete(); docuValue.delete(); ttscommit; infolog.clear();//Clear the message about archiving the report var messageBuilder = new SysMailerMessageBuilder(); messageBuilder.addTo(sendToEmail) .setSubject(Subject) .setBody(Body) .addCC(HcmWorker::find(ccEmail).email()); if (sendFromEmail) { messageBuilder.setFrom(sendFromEmail); } if (stream != null) { messageBuilder.addAttachment( stream, 'Invoice.pdf'); } SysMailerFactory::sendNonInteractive(messageBuilder.getMessage());

Forum Post: How we can change the sales order type from Sales Order to Journal , if some invoicing done from that sales order

$
0
0
How we can change the sales order type from Sales Order to Journal , if some invoicing done from that sales order

Forum Post: IFRS vs GAAP Scenario

$
0
0
I have one scenario hoping to get some guidance from you. I have a group of companies where the HQ is in Dubai where they follow IFRS and one of its branchs is in Spain & France which they have their own local GAAP, the challenging difference is that French government is forcing companies to abide to a given COA. How can make the two COAs live together as the HQ still wants to see the company's TB and consolidate in IFRS only. I thought of making two legal entites in AX where the first has their local GAAP COA etc, then for each month they take its TB and book it the the second company that uses the HQ COA using a COA mapping between the two, then book all the needed adjustments in another layer so it can be easy to reconcile. Please let me know your thoughts and I would really appreciate your suggestions.

Forum Post: RE: how and where to choose Layer in D3FO?

$
0
0
Thanks Sukrut, As i understand now Layer is not much important as earlier version. For development i can choose any layers between ( USR,CUS,VAR ) while creating a new Model. For example : 1. Suppose i created a new Model : "Model 1". and choose Layer "CUS" 2. Now i have to select "Package" : We have 2 options > New Package or Existing Package Can you please let me know when to select New Package or Existing Package ? Please give me an example. Thanks! Regards, Arpan

Forum Post: RE: how and where to choose Layer in D3FO?

$
0
0
Your question "when to select New Package or Existing Package ?" doesn't belong under the title "how and where to choose Layer in D3FO?". Please mark the verified answer of this thread, try finding the answer to your new question on internet (it's been discussed in documentation as well as in blogs and older threads here) and only if you fail, please create a new thread and explain which part you didn't get after reading the documentation etc.

Forum Post: RE: How we can change the sales order type from Sales Order to Journal , if some invoicing done from that sales order

$
0
0
Hi Anil Kumar Pandey, You can't. Why do you want to do that? Best regards, Ludwig

Forum Post: Ax 2009

$
0
0
Hi Firends is the below expression correct? if(Table.RecId) ? return true : return false; I am getting syntax error while compiling. Regards Martin. A

Forum Post: RE: how to see the cost price in the inventory counting journal?

$
0
0
Hi BASMA, Filling the journal this way should default the cost prices that you can find at the item master. If you open the released products form and select the item MDSTA1.023 what cost price can you identify in the costing tab? Best regards, Ludwig
Viewing all 131213 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>