Skip to main content

Notifications

Announcements

No record found.

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

  • LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: Click field Yes - pop message selection

    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

  • Johnseito Profile Picture
    Johnseito 340 on at
    RE: Click field Yes - pop message selection

    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.

  • Johnseito Profile Picture
    Johnseito 340 on at
    RE: Click field Yes - pop message selection

    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
    Johnseito 340 on at
    RE: Click field Yes - pop message selection

    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
    Johnseito 340 on at
    RE: Click field Yes - pop message selection

    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

  • LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: Click field Yes - pop message selection

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,253 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans