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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Click field Yes - pop message selection

(0) ShareShare
ReportReport
Posted on by 340

Hello, 

Three field was created - option yes/no, date and selection. When the yes/no field was clicked to yes, a pop up option appears with choices to select. Once a selection is made it populate the date and the selection field with the choice of selection and then it closes the job. The option yes/no is still yes after the other fields is filled because yes caused all these to happen. 

two question on how this is done. when first click on the option yes/no to yes. This yes cause the pop up to appear. But since the field is still yes, wouldn’t the pop up continue to appear. How does it stop from appearing because is still yes or always true. And then how does it close the job ?


hope I make sense. I tried the same code with different fields I made. When I click to yes, the pop up keep popping up because the option is yes and then other times I did the same thing, there is no pop up at all, not even once and not even when the option button is yes. 

please advise

I have the same question (0)
  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    1.Did you add the code to option yes/no field "onChange" event?

    If so, then the function to open the pop window will only be triggered one time when you change the option to "yes". After that, this function will not run again.

    2.About how dose the pop window close, please provide your code here for more details.

    Regards,

    Leo

  • Johnseito Profile Picture
    340 on at

    Thanks for the message and info. It’s OnLoad, how do I set it to OnChange event ?

    I think the pop up close by itself after a button is clicked. The thing I am not sure about it how it close the job. For example I have job close reason field, select an  options, the code set the field to this option. How does it affect or change the status reason with this selection option ?

    below is code example.

    3A963774_2D00_57B4_2D00_41DC_2D00_98B0_2D00_ACEB0FBE3733.png

  • Johnseito Profile Picture
    340 on at

    I figured out the on change event.

    Go to the form and clicked on the field and in event tab is where we make edit to on change event.

    But I don’t know how the close reason changes the status reason to close. They are separate fields.

  • Johnseito Profile Picture
    340 on at

    I put the code in OnChange event. 
    I clicked it to mark it yes, and chose the closed option.

    It changed the status code 
    and refreshed but the pop up appears again.

    do you know why the pop up would appear again, likely because the field is still yes. If it works normally, the pop up would not appear again.

  • Johnseito Profile Picture
    340 on at

    Ohh sorry I spoke too soon.

    It’s because is in both OnChange and onLoad is why.

    Still not sure how it affects the status reason field though to close the job.

  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    Thanks for your details.

    Do you mean when you click on "closed" ribbon on pop up window, this record changed its status reason to "closed" either?

    If so, I did not find any regarding code in your samples, and you need to check the following things.

    1.When you click on "closed", you will update 2 fields, so you need to check if there is any business rule, workflow, power automate, or other JS function to change the status reason when updating these 2 fields.

    2.You could add auditing on this entity and check the auditing history after the status reason changed.

    Regards,

    Leo

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 45 Most Valuable Professional

#2
iampranjal Profile Picture

iampranjal 36

#3
Satyam Prakash Profile Picture

Satyam Prakash 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans