Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Salesparmtable - InitfromSalesTable() method

(0) ShareShare
ReportReport
Posted on by 2,422

Good Morning,

I have added one field to salestable_extension table
i want to flow it to salesparmtable.
There is one method in Salesparmtable - InitfromSalesTable()
I want to write code in the above method.
What should be done in that case.
Copying event handler is the solution and in that pre or post should be used?
Please show some light on this.
Regards.
Have a great day.

*This post is locked for comments

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,422 on at
    RE: Salesparmtable - InitfromSalesTable() method

    Thanks for your kind reply.

    I will make a try and let you know.

    Regards.

    Have a great day.

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Salesparmtable - InitfromSalesTable() method

    1. Yes

    2. Please see this example:

    [ExtensionOf[tableStr(SalesParmTable))]
    final class MySalesParmTable_Extension // Remember to include your prefix in the naming to avoid conflicts with standard objects, isv solutions and so on
    {
        public void initFromSalesTable(SalesTable _salesTable)
        {
            next initFromSalesTable(_salesTable);
    
            this.MyField = _salesTable.MyField;
        }
    }


  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,422 on at
    RE: Salesparmtable - InitfromSalesTable() method

    Hi,

    Thanks for your reply.

    1. Post event handler - If i do so, if i copy paste handler and paste in class then in that copied handler method i will get args right.. In that which record will be present.

    Salestable or Salesparmtable record.

    2.Chain of command - can you give some example .

    Regards.

    Have a great day.

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Salesparmtable - InitfromSalesTable() method

    Yes, you can use

    - a post event handler

    - or Chain of Command and add your logic after the "next" call.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,422 on at
    RE: Salesparmtable - InitfromSalesTable() method

    Experts please reply.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,111 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,934 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans