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)

Disabling Remove option from InventJournalProject Form when posted

(0) ShareShare
ReportReport
Posted on by 182

Hi Guys,

My client requires 'Delete' option to be disabled in Invent Journal form when the journal is posted. I have write code in the class InventJournalFormTable class's enable buttons active method to achieve this.

Invent-Journal_5F00_1.jpg

However my issue is, when I go to Lines, delete option is still there and I am confused how to disable it as I am new to coding. Your help is appreciated.

Invent-Journal_5F00_2.jpg

Thanks,

Maverick

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Disabling Remove option from InventJournalProject Form when posted

    Hi Maverick,

    Simply removing this delete button might not be sufficient because there is a periodic functionality in the inventory module available that allows cleansing project item Journals as well. So, you either also remove the inventory module menu item in addition or modify your user roles in a way that users can't delete those journals. I would probably go for the second option and modify the roles because not only project item journals but also other journals can be deleted/cleansed.

    Best regards,

    Ludwig

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: Disabling Remove option from InventJournalProject Form when posted

    It is not the button which you want to disable, but the FormDataSource has a property AllowDelete. You must set that as false from your code within the form. I would place that code in the init method of the form or the formdatasource after the super() call (so the datasource is already initialized), something like YourDataSourceName_ds.allowDelete(false).

    https://msdn.microsoft.com/en-us/library/formdatasource.allowdelete.aspx

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans