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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Like to disabled original preview button

(0) ShareShare
ReportReport
Posted on by 30

Hi team,

As per the client requirement,  in AR - Invoice Journal - Document - Original Preview. 

If suppose , user select one Invoice I'd and click on Original preview. After generating the report the option should be disabled becuse user dont want to print the original invoice multiple times. That I have done.

If the Original preview button is disabled from Invoice Journal simentaneously from Voucher - Voucher Trandaction - original document - Print preview also should be disabled as well as from Customer transactions also. 

So, that user not able to print the Original print preview from other form.

Kindly let me know how we can disable the original preview option from Vouchet a d customer transaction. 

Pls give me more shed on this 

I have the same question (0)
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    Hi, you can try the same approach how you did for the invoice level also. Otherwise you can try this.

    Create a new field in that table like NoYes and update that record once report is generated. Like once report is generated for invoice, means we will have a controller right. So write coc after next to update this noyes to yes and if it is yes then in the active method of this ds you can disable the original menu item.

  • @rp@n Profile Picture
    30 on at

    Thanks Baharani

    I am little bit confused

    Let's assume Form A, Form B and Form C

    If suppose user open form A and click on Original preview , after generating the report the button get disabled. This is happened now.

    In the same time how I will disabled original preview button from From B and Form C?

    Is it possible to do?

    Pls give me more shed on this

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    That is why I said to create a new field. If you create new field in that ds, then

    Presently you are able to disable in A form. So at that condition where you are disabling this original in A form, just call the update logic for that field so that it will change to Yes right?

    You will have already a code if noyes field is yes then disable this menu item in your active method. That's it.

  • @rp@n Profile Picture
    30 on at

    Thanks Baharani,

    Little bit not understood.

    Yes, in form A, active method I already wrote code to disable the button Original preview for Form A.

    Now, Form B and Form C are separate form then how I will call those buttons Original preview in Form A active method?

    If possible,  kindly send me the code pls

    Pls give me more shed on this

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    I assume you make have added some condition for Form A to disable that menuitem once report is generated.

    Now in Form B or Form C we have datasource. So create a new field in that datasource. As you said that if report is generated then menuitem should be disabled in Form B and C. So, I assume there is some common field between them.

    Lets assume report is generated so Form A menuitem is disabled.

    Now you already added NoYes in B right. Thing is if you update it to Yes, your menuitem in Form B will be disbled as you already have written a code in Form B active (lets assume). That means you are left with updating the Noyes to yes right?

    So write the update code in the FormDs class extenstion in a new method and call this method in the active method of form A.

    Then, first report will be generated > your form A menuitem is disabled as we have active method code > active calls new method for update > if Noyes is yes you will have active method again in form B > This active makes the menuitem disable.

    Same for form c.

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi @rp@n, May I know how you are disabling Print button or Original Document in Invoice journal form.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 692 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 558 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 364 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans