Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

disable delete button

Posted on by 605

Hi Everyone ,

can someone pls tell me how to disable the delete button through code which is present at SalesOrder Tab-> Maintain..at the ActionPane.

Thanks in Advance

*This post is locked for comments

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: disable delete button

    another thread in parallel, for same issue, i guess.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,253 Super User 2024 Season 2 on at
    RE: disable delete button

    If it is conditional, then don't use the property on the form design like mentioned above. The example provided by Jii is better.

    However, "site field is blank" sounds odd to me as condition.

  • Verified answer
    JII SAADUDDIN Profile Picture
    JII SAADUDDIN 1,832 on at
    RE: disable delete button

    But anyway you mentioned "through code"

    here's the example how to manipulate enable and disable

    if( YOUR_STATEMENT_CONDITION_HERE )

      {

          ButtonName.enabled(true);

      }

      else

      {

          ButtonName.enabled(false);

      }

  • Suggested answer
    JII SAADUDDIN Profile Picture
    JII SAADUDDIN 1,832 on at
    RE: disable delete button

    I Agree with master Mahmoud Hakim

  • Suggested answer
    Mahmoud Hakim Profile Picture
    Mahmoud Hakim 17,887 on at
    RE: disable delete button

    just disable it from design as the below

    2821.7.png

  • AXBOY Profile Picture
    AXBOY 605 on at
    RE: disable delete button

    i need to disable the Delete button from Sales Order from Sales Order grid for only those sales order whose site field is blank.

  • Suggested answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: disable delete button

    To disable it disable deletion on salestable datasource:
    salesTable_ds.allowDelete(false);

  • Suggested answer
    JII SAADUDDIN Profile Picture
    JII SAADUDDIN 1,832 on at
    RE: disable delete button

    Hi AXBOY, can you please specific? do you want permanet disable delete button or during selections only?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans