Microsoft Dynamics AX - Sales Order to Invoice class location - axapta

I'm looking to make a modification in the logic where an invoice is made from a Sales Order.
In other words, as soon as the Sales Order status changes to "Invoiced", I want to be able to add some additional code there that updates something else.
I'm having a lot of trouble finding the class where this is performed. Can somebody point me in the right direction? It would be greatly appreciated.
Thanks.

The classes you are looking for are
\Classes\SalesFormLetter_Invoice - For interacting with SalesEditLines
\Classes\SalesInvoiceJournalCreate - Creating journal data
\Classes\SalesInvoiceJournalPost - Posting a journal
\Classes\SalesInvoiceJournalPrint - Printing
\Classes\SalesFormletterParmDataInvoice - Creating parm data
The specific method you probably want is \Classes\SalesInvoiceJournalPost\postJournalPost, which is executed after the journal has posted from \Classes\FormletterService\run#91
Refer to this whitepaper for some more information:
http://technet.microsoft.com/en-us/library/hh272871.aspx

Related

microsoft dynamics webAPI listing purchase orders

How do you list purchase orders using the Microsoft Dynamics WebAPI?
Similarly, how do I list purchase orders with their line items using WebAPI?
I am having a real hard time finding decent and clear documentation on using WebAPI to find purchase orders, and especially purchase order line items, so any help would be appreciated. I just need a good starting point. Even some library would help, as I could look at what the library is doing and maybe try to mimic it.

Calculate % based on Total Events for Event Action in Google data studio

I just started to use Google Data Studio for creating a dashboard to get more insights in our data. Now I've created the table you can see below.
This is the data from the trackers on our video's. The first event action videotrackerStart is the total amount of people who started watching the video. What I want to do is calculate what percentage the rest of the event actions is from the videotrackerStart event.
So for example (176,985 / 222,468) * 100 = 79.5% and that for each action.
The problem I face, is that I don't know how to (if it is even possible) save the Total Events for videotrackerStart in a variable and use that value to create a new metric.
Does anyone know how I could get this done? I hope the question is clear, please let me know if not.
Thanks in advance!
Edit (2017/10/26): Percentage of total is now supported in Data Studio using Analytics Functions.
Original: Percentage of total for a metric is not yet supported in tables in Data Studio. You can Request this feature or vote for the feature in the existing feature request list.
To represent the same information visually you can try using barcharts.

Vendor Invoices - Charges Code & Vendor Ledger Dimension

I have a charge code called FREIGHT set up with the following configurations. Under Credit, I've specified a ledger account of 4800.
I now create a Purchase Order, confirm and go through the whole process, and then try to invoice / post it.
I'm presented the following error:
"The combination 4800- is not valid for the account structure MYACCOUNTSTRUCTURE"
So it's been identified that AX is attempting to use 4800 from the aforementioned charges code field MarkupTable.VendorLedgerDimension.
In the code, it crashes in the PurchFormLetter.run() method, and if I did further it goes into the SysOperationController\pack super(); class before it crashes.
Now, if I were to change my account from 4800 to for example 2100, then the invoice goes through fine, which is good.
My question, and what I need is to find out what class / where in the code is this happening during the invoice post process that AX is trying to use this MarkupTable.VendorLedgerDimension field. I need to access that part of the process and modify that value (obviously 4800 is just the display value) to be something else.
If anyone needs more information for background, I need to keep the account for FREIGHT at 4800, while setting the actual financial dimension to the financial dimension on the line item. I've been debugging and looking all over the place for where this process occurs, but have had no luck so far.
If anyone can point me in the right direction, it would be very greatly appreciated.
Thank you.
Check what dimensions are mandatory on this account. Then set financial dimension on invoce lines.

Contact to a lead in CRM Dynamics 2013

I know in CRM 2011 you can not convert a contact to lead. Is it possible in CRM 2013 .
In simple words i have created a contact and grouped it in to a account. I would like to convert this contact in to lead so that i can make a sales entry.
Strange all leading CRM package provides this , in 2011 its not available is it there in 2013.
This functionality is not available out of the box. However, there are a number of ways to implement this.
The easiest would be to create an 'On Demand' Workflow - that creates a Lead with information from the Contact. This can be run manually against specific Contacts - as I presume you don't want to do this for every Contact.
The alternative is to use the SDK, you could create a Lead from the information in the Contact and have a Ribbon button to invoke the SDK code.
Typically, you would convert (Qualify) a Lead into to an Account, Contact and/or Opportunity. It is unusual to convert a Contact to a Lead.
I think your problem is one of terminology, not functionality.
If you want to record a new potential sale for an existing Account or Contact, the most obvious thing to do would be to create an Opportunity.
If for some reason you want to create a potential potential deal, and want to use a Lead to hold this so you can do a more formal pre-qualification before you get to Opportunity, then just create a Lead linked to the Contact and Account. Since there is a relationship there already, you cold do this by adding a sub-grid on the Contact form, or adding Leads to the navigation on the form (like any other child entity).
You don't need to "convert" the Contact, keep that as it is and just add another record to represent the possible new sale.

Dynamics Ax 2012 Missing Category Column in EcoResProductCategory

We are having an issue with the form EcoResProductCategory. At one point, this form had a column named 'Category' that our company utilized. Somehow this column has gone missing. My team develops on the CUS level and there is a vendor that I believe pushes additions to the level lower. As of now, there is no CUS level customization to this form. When looking at the form in the AOT, it appears that the Category field is in fact present (and visible in the properties). But once the form is opened, it still doesn't show.
Any ideas or pointers? I am still new to Microsoft Dynamics AX 2012 and I apologize for asking a question like this.
Another Note: When compared to the AX Demo, it seems like our environment is missing the following label...
Is it missing for all users, or for one user? In the latter, it could be that it is hidden by by MorphX (Right-clicked and hidden).
Just to make sure it isn't usage data, delete the usage data for that user.
Turns out, a related data table had a field removed. Therefore the dropdown was never being generated.

Resources