I’m new to DAX and I’m having trouble trying to figure out how to add new fields to a form. The form is called SalesPostingHistory and is located under - Accounts Receivable > Inquiries > Journals > Invoice. The two new fields I’m trying to add are: CreatedDateTime, CreatedBy. Here’s what I tried so far: Right-Clicked on the form > setup, then I clicked “Add Fields” to the OverviewGrid. I wasn’t able to see the two fields I need added.
I’m using Dynamics AX 2009. Any help would be greatly appreciated.
First of all, the form under Inquiries > Journals > Invoice is CustInvoiceJournal, not SalesPostingHistory.
Then you have to decide what exactly you want to achieve.
The procedure you try to use is intended for end-users, so they can personalize how forms look. You would change the form just for yourself and just in the current application. The setup wouldn’t be moved together with code. Also, users are allowed to add only fields which are already displayed somewhere in the form or which have been explicitly allowed to be added. Therefore you could add the fields on a separate tab, for example, and allow individual users to add them to grid, if they find it appropriate. Or you could change AllowAdd property on relevant fields on the form datasource to Yes.
The other approach is to add the fields to the form design in AOT, so they’ll be there for user by default. Just drag the fields from datasource to the grid. In other cases, fields may be based on a field group - then you would simply drag fields to the field group on table level.
You may also find useful to look into documentation. Do it often.
Thank you very much for your response - as you can see I’m still in the early stages of learning DAX. Indeed, CustInvoiceJournal is the form in question and not SalesPostingHistory - thanks for the correction. Here’s what I’d like to achieve - allow the user to add the fields CreatedBy, CreatedDateTime to the grid. I don’t want these fields to display by default since some users don’t always want to see those two fields.
Here’s what I did so far - right-click on the form and clicked setup, selected the OverviewGrid from the tree and clicked the “Add fields” button. The “Select fields” dialog displays, I open up the Customer Invoice Journal node, but I’m unable to see the two new fields I’d like to add. My thought was to get CreatedBy and CreatedDateTime populated under Customer invoice journal, which would allow the user to add those two fields to the grid in the overview tab. Is my logic right? - The part that I’m struggling with is how to get CreatedBy and CreatedDateTime populated under Customer invoice Journal in the Select fields dialog.
I’ll be sure to look at the documentation you referenced in the previous post often.