Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to Grey out a specific button (generate receipts list)

(0) ShareShare
ReportReport
Posted on by 66
Hi all
 
I have a requirement to grey out the receipts list button on POs. Is this possible using the security workspace, or do I need back end access? 
 
If I can use the security workspace, does anyone know how I can search for this control? Or is there a data entity I can use to find this setup?
 
Thanks :)
 
  • Suggested answer
    NikolajSorensen Profile Picture
    NikolajSorensen 1,703 on at
    How to Grey out a specific button (generate receipts list)
    You can't grey it out. That would imply that it is available to the user but the business logic would prevent you from using it.
     
     
    You can however through the security setup control which security roles will get access to process the receipt list.
     
    The privilege "Process purchase receipts list print" is the one containing the access you are looking for. So you will need to analyze your security setup, to find out how to remove it from the security roles, that should not have access.
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,466 Most Valuable Professional on at
    How to Grey out a specific button (generate receipts list)
    Permissions for the menu item (PurchFormLetter_ReceiptsList) are provided in a privilege called Process purchase receipts list print (PurchFormLetter_ReceiptsListProcess), therefore you should remove this privilege from the given role.
     
    If you don't want to use permissions for some reason and you want to conditionally disable it in code, it's controlled by PurchTableType.mayReceiptsListBeUpdated().
  • Suggested answer
    GirishS Profile Picture
    GirishS 27,816 Super User 2024 Season 1 on at
    How to Grey out a specific button (generate receipts list)
    Hi benken,
     
    I think it can be done via Security configuration form, but for identifying the security privilege and roles you need to know the Menu item name - Also you need to find out the privileges related to the Receipts list form through security diagnostics form only - But that form is not available when you open the Security diagnostics form.
    So, I will recommend you find out the above said things with the help of the developer. Later you can navigate to the security privileges and set the access level for the specified menu item name.
     
    Thanks,
    Girish S.
  • Suggested answer
    Hana Xue Profile Picture
    Hana Xue Microsoft Employee on at
    How to Grey out a specific button (generate receipts list)
    Hi,
    Perhaps you can try to set it up by following these steps:
    • Go to AOT in Visual Studio
    • Go to the Form (PurchTable) in AOT.
    • Right-click the form and click Create extension.
    • Extension of Form would be created in the project.
    • Double-click the form extension from your project.
    • Find out the button in the form designer.
    • Open the properties of the button.
    • Set the Enabled property to No
    • Build the project and run the D365FO in the browser.
    • Verify the changes.
    Also,you can briefly view this article which tells about the data model behind the receipt:
    Data Model Tutorial Dynamics 365: Item Receipts & Inventory Registration (instructorbrandon.com)
    Best Regards,
    Hana
     

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans