cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Newmayer2384
Regular Visitor

Custom Button | onclick function to open a pop-up form

Hi,

first I will let you know what I am trying to achieve.

 

I got an readyOnly form and my client wants a custom button to edit only one field (a status).  

So far I did manage to create a custom button, however I have not the expertise to write a javascript in order to link the button with a form neither to make the form appear as a pop-up window. 

 

Could anyone provide me help with writing a javascript to link a button to a specific form plus to let the form appear as a pop-up on the onlick event.

 

Thank you very very much!

1 REPLY 1
OliverRodrigues
Super User
Super User

Hi, do you need it to be via a pop-up window? 

 

The easiest/simplest way to achieve your requirement, would be having your Entity Form as Edit mode, and set all fields (besides your status field) as read-only in the Dataverse form.. this way those fields wouldn't be updated when you submit the form

 

another thing to mention is that if the status field is the OOB Status Reason, I have the feeling you can't update that via Portals, you would need a workflow or Web API to update that

 

Another possible approaches for what you need:

  • Use classic Workflows and add them to your Entity Form, this would appear as a button in your form.. so basically you can have different buttons for "Mark record as XXX", and this would trigger the workflow which would update the record
  • Other option would be using Web API which is what I think what you are trying to do.. that would work but it seems too much work in my opinion 



If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call August 2022 768x460.png

Power Platform Community Call - August 2022

Join us for the next call on August 17, 2022 at 8am PDT.

Top Solution Authors
Users online (4,841)