cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
janvi_1
New Member

Disabling model driven app button on form

Hello,

 

I have created a button command in Model driven app (on a Microsoft dynamics CRM Form)

Is there a way to disable the button after clicking it once using some kind of timers?

2 REPLIES 2
gowrihalan04
Helper V
Helper V

@janvi_1 You cant hide it based on timer. You can write JS and hide the button based on any field value. Haven't tried Power FX but you should be able to do.

DianaBirkelbach
Super User
Super User

Hi @janvi_1 , 

 

Not a timer, but you could use some javascript: 

Use a variable (like isClicked=false). After a click, set it to true. You could use that variable in an enableRule script.

When the "icClicked" gets changed from false to true, you can call refreshRibbon, so the enable Rule gets applied.

 

If the purpose of your question, is to avoid having parallel running scripts (so if you intend to enable the button again when an operation finished), I would suggest to treat that inside the code, and let the button enabled all the time. Maybe you could show a notification as a feedback to the user.

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,350)