Showing posts with label Dynamics 365 learning. Show all posts
Showing posts with label Dynamics 365 learning. Show all posts

Tuesday, 10 September 2019

Use Coc(Chain of command) for methods on form datasource/Controls/DataSource fields D365 Finance and Operations

Hi folks, we all might have faced the situation where you needed to use the methods on datasources/controls of d365 standard forms.
Its much easier than you think, only drawback is you don't really have a power of intellisense on this.
But, who cares as long as it works.

Scenario:
Form: SalesTable
Datasource: SalesTableExt (Custom table)
Task: to fillup value in field salestable (recId of salesTable data) on datasource write method.

///
/// extension class for SalesTableExt on form SalesTable
///
[ExtensionOf(formdataSourceStr(SalesTable, SalesTableExt))]
final class SalesTablefdsSalesTableExtTest_Extension
{
    ///    
    /// write method on datasource
    ///    
    void  write()
    {
        this.writePre();
        next write();
    }

    ///    
    /// prewrite method
    ///    
    protected void writePre()
    {
        this.resolveSalesId();
    }

    ///    
    /// salesId(recid) update in SalesTableExt
    ///    
    protected void resolveSalesId()
    {
        FormDataSource      ds              = this;
        SalesTable          salesTable      = ds.formRun().dataSource(formdataSourceStr(SalesTable, SalesTable)).cursor();
        SalesTableExt       salesTableExt   = ds.cursor();

        salesTableExt.SalesTable = salesTable.RecId;
    }

}

Attribute
[ExtensionOf(formdataSourceStr(SalesTable, SalesTableExt))]
defines the object where COC has to be performed.

In a similar way, we can use Coc on form controls. Only difference would be there on attribute for class, it would be like
[ExtensionOf(formControlStr(SalesTable, SalesTableExt_SalesTable))]


and if needed on form datasource control, then attribute would be like
[ExtensionOf(formDatasourceControlStr(SalesTable, SalesTableExt, SalesTable))]


Mind, this can be done only post Update 22.

Thanks!!! See you on next post......

Tuesday, 1 August 2017

Technical sources for Dynamics AX Learning

This is my first blog and I want to share my experience and knowledge of AX and Dynamics 365 with all of you. Wish me a luck. This is just the beginning and i hope to be posting so many things in upcoming days.
In the series first, what most freshers(New to dynamics AX) try to google is the good sources to learn AX, so I will be mentioning few of the best sources which I personally found to be useful during my journey of AX.

Dynamics AX free online content:
1. https://msdn.microsoft.com/en-us/library/aa493463(v=ax.10).aspx : Free online material by Microsoft for Dynamics AX and its evolved so much to be informative enough.
2. https://technet.microsoft.com/en-us/library/gg852966.aspx :  Another online material from Microsoft.dedicated fully for technical aspects. There are so many whitepapers available to download for free from here in order to explain some advanced topics in AX (e.g., Etterprise portal, global address book, number sequence framework, dimension framework, etc..)
3. https://docs.microsoft.com/en-gb/dynamics365: Dedicated completely for Dynamics 365 based products and contains enormous explanatory contents on every topic.

Books to start with:-
6. Learning MS Dynamics AX 2012 Programming : Printed by PACKT publishing, and is available to purchase from Amazon.

Advanced books:-
7. AX Installation guide: provides complete specification and AX installation steps. Available as whitepaper on technet.
8. Microsoft Dynamics AX 2012 R3 administration cookbook:  complete coverage of system administration for AX. Printed by PACKT publishing and is available to purchase from Amazon.
9. Microsoft Dynamics AX 2012 R3 Reporting cookbook:  Fully dedicated for SSRS reporting in AX. Printed by PACKT publishing and is available to purchase from Amazon.
10. Microsoft Dynamics AX 2012 R3 Services : Completed coverage of AIF and services in AX. Printed by PACKT publishing and is available to purchase from Amazon.
11. Inside Microsoft Dynamics AX 2012 R3 : One of the books by Microsoft Press. Available to purchase from Amazon.
11. Dynamics 365 for Finance and operations development cookbook : One of the books by pktpub . Available to purchase from Amazon.

AX community forums:-
12. https://community.dynamics.com/ax : Official community from Microsoft. By far the best online forum to post your questions and you might be interested to see the answers for questions(queries/issues) posted by others. In addition, there are couple of AX techies who frequently posts their article on the forum.
13. Dynamics user group
14. Stackoverflow

In addition there are plenty of professionals who are running their own blogs. I will not name any, but you can always come across them while trying to search anything related to AX.
Tip: Before posting your questions on any of the forums or blogs, its better to google that using significant keywords. You might get answers/articles to the same question/topic posted by others.

I have tried to cover most of the available learning resources here. Still, if I have left anything which you are aware of, feel free to share with me to update the article.