web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Salesline modifiedField method is not firing

(0) ShareShare
ReportReport
Posted on by

Hi, 

I have noticed that Salesline modified field is not firing even if the saleline field modified. 

This is easy to reproduce ( I even reproduce in VM box) Any sales order header view edit delivery mode and change it a different delivery mode than currently assigned . After the editing you will see the the salesline dlv mode is changed as per sales header . However I don't see modified filed is not fired though it is modified. 

Standard AX achieve this by using Axd and AxTable classes . Dlv mode is setting at AxSalesTable setdlvmode method and it is saving there. Ideally at this point modified filed suppose to firing . Any specific reason. I have to add a custom code at modified field . At this point I don't want to modify Axd classes as it is integrated and more test cases to covered . 

Thanks in advance 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Brandon Wiese Profile Picture
    17,788 on at
    RE: Salesline modifiedField method is not firing

    The xRecord modifiedField() and modifiedFieldValue() methods only fire when the field is changed from the UX, not from X++ code.  When you change a field on a SalesTable record and it is copied to all SalesLine records by a class, that will not fire the modifiedField() method, or the validateWrite() or write() methods.  Those are all UX methods, unless they are called explicitly by code.

  • Muneeb Profile Picture
    895 on at
    RE: Salesline modifiedField method is not firing

    Hi Umesh,

    Case-1: From UI if you are trying to edit the dlv mode on SaleLine or may be any field on salesline, the modifiedField method present on SalesLine will always be called. Can you please check if the debugger is enabled.

    Case-2: When you are performing the same operation via AIF this modifiedField method will NOT be called as the operation is NOT being performed via UI and thats the standard behaviour of AX.

    As rightly said by Brandon above.

    However, there are AxBC classes and Axd classes to achieve certain things. If you can let me know your exact scenario like what you want to achieve , I can help you with my inputs.

    Sincerely,

    Muneeb

  • Community Member Profile Picture
    on at
    RE: Salesline modifiedField method is not firing

    Thanks for the quick turn around.

    My scenario is not both the of above cases. I am updating SalesTable (header ) dlv mode , which is updating automatically salesline  , this is a standared AX behavior no custom here. However standard AX achieving this by calling Axd classes .  Though it is Form change internally it is calling through Axd classes that is why . This makes sense.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans