Wednesday, 27 February 2019

Alert and Confirm syntax will not work for Dynamics 365 App For Outlook

Recently, I just helped customer to upgrade their system to 9.1.x.x
We encountered many issues. However, the issue that I want to bring up now is issue regarding to the App for Outlook

We found that there is custom ribbon that calls Custom Javascript and it does nothing, no error, nothing is so-called exception occurred because I did debugging and did place the try catch block.
Unlike using Web, the debugging in Outlook is not so easy.
After I did debugging with try catch, I found out that the script is actually running well and has no error.

So, the problem is: the script that is executed is pretty simple just do some validation and show alert when does not fulfill, then throw a confirmation dialog then save the form.
Yes, the script is sucessfully executed from start to the end.

Then, why the ribbon function is not running?



It is because the alert and confirm scripts are still using old ways:

alert("Please complete all mandatory fields before submitting the form")
if (!confirm("Are you sure that you want to submit this form??")) {
            return;


So, there is no error it is just not 'supported' and not 'translated' well in the App for Outlook.
yes, it does working in Web, but not in App for Outlook.

So, after I changed it to

 Xrm.Utility.alertDialog("Please complete all mandatory fields before submitting the form");
or
    var alertStrings = { confirmButtonLabel: "OK", text: "Please complete all mandatory fields before submitting the form" };
    var alertOptions = { height: 100, width: 500 };
    Xrm.Navigation.openAlertDialog(alertStrings, alertOptions);

and

if (!Xrm.Utility.confirmDialog("Are you sure that you want to submit this form??")) {
            return;
        }

It is working perfectly!
Example:








**The first one is still supported and it is intended for simple alert.
Xrm.Utility namespace may be obsolete for the Alert and Confirm Dialog, so as per MSDN recommendation, we need to change it :
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-navigation/openalertdialog

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-navigation/openconfirmdialog

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility

Hope it helps!

Thanks




65 comments:

  1. Very good content. I read your blog that was awesome, please doing continue daily post. Customer Relations Software in Indore

    ReplyDelete
  2. this is the best softwre you can do this foe small business B2B Lead Generation Software. this software for handle online accounting

    ReplyDelete
  3. We the biggest BRS Photoshop Service As images of products are the biggest weapon for a business company. Perfect photoshop service means a lot to this professional business purpose. Do Visit to have more knowledge about unique service.

    ReplyDelete
  4. Excellent blog information provided by the author
    Best Play and Pre School for kids in Hyderabad,India. To give your kid a best environment and learning it is the right way to join in play and pre school were kids can build there physically, emotionally and mentally skills developed. We provide programs to kids like Play Group, Nursery, Sanjary Junior, Sanjary Senior and Teacher training Program.
    ­play school in hyderabad

    ReplyDelete
  5. Perbedaannya adalah pada permainan Bandar Sakong, masing-masing bettor mendapatkan 3 kartu remi. Permainan sakong terdiri dari 8 bettor yaitu 1 orang jadi bandar dan 7 lainnya adalah bettor
    asikqq
    dewaqq
    sumoqq
    interqq
    pionpoker
    bandar ceme
    hobiqq
    paito warna terlengkap
    Syair HK

    ReplyDelete
  6. server installation and configuration services
    WELCOME TO ANIKA TECH SUPPORT
    Anika Tech Support managed by a team of professionals utilising a combined 20+ years of experience in IT support and Managed IT services Focusing on Proactive support, continuity, growth and development. We are a forward thinking IT Company who support public and private sector using the latest tech as a driving force for our client’s Success.

    ReplyDelete
  7. Packers and Movers Bangalore Near me - Get Verified and Expert Shifting Service Providers, Who can Help you With 24x7 and Safe, Affordable Services for National Household Relocation. Compare Charges and Time, Save Money.

    ReplyDelete
  8. Good explanation of the topic

    Sanjary Academy is the best Piping Design institute in Hyderabad, Telangana. It is the best Piping design Course in India and we have offer professional Engineering Courses like Piping design Course, QA/QC Course, document controller course, Pressure Vessel Design Course, Welding Inspector Course, Quality Management Course and Safety Officer Course.
    Piping Design Course in Hyderabad ­

    ReplyDelete
  9. List of Best Carpenters Service Near me in Bangalore - Top Rated Carpenter in Bangalore, Book Carpenter Services Online in Bangalore, Book Carpentry Services Online at Home In Bangalore. Get Free Best Price Quotes Carpenters Service in Bangalore Compare Charges, Save Money And Time @ Carpenters in Bangalore

    ReplyDelete
  10. List of Best House Painters Service Near me in Bangalore - Top Rated House Painters in Bangalore, Book House Painters Services Online in Bangalore, Wall Painters in Bangalore. Best Price Quotes House Painters Service in Bangalore Compare Charges, Save Money And Time @ House Painters in Bangalore

    ReplyDelete
  11. List of Best Plumbers Services Near me in Bangalore - Top Rated Plumbers in Bangalore, Book Plumbing Services Online in Bangalore, Get Certified Technician at Your Doorstep for Plumbers Services. Best Price Quotes Plumbers Service in Bangalore Compare Charges, Save Money And Time @ Plumbers in Bangalore

    ReplyDelete
  12. List of Best Electronic Service Near me in Bangalore - Top Rated Electrician in Bangalore, Book Electronic Services Online in Bangalore, Get Certified Technician at Your Doorstep for Electronic Services. Best Price Quotes Electronic Service in Bangalore Compare Charges, Save Money And Time @ Electricians in Bangalore

    ReplyDelete
  13. Excellent product by Microsoft.Thanks for sharing Surya Informatics

    ReplyDelete
  14. Thanks for sharing such a great information with us.Keep on updating us with these types of blogs.
    professional web design company in chennai

    ReplyDelete
  15. Thanks for posting the information it is useful and helpful

    Pressure Vessel Design Course is one of the courses offered by Sanjary Academy in Hyderabad. We have offer professional Engineering Course like Piping Design Course,QA / QC Course,document Controller course,pressure Vessel Design Course,Welding Inspector Course, Quality Management Course, #Safety officer course.
    Welding Inspector Course
    Safety officer course
    Quality Management Course
    Quality Management Course in India

    ReplyDelete
  16. You have a real ability for writing unique content. I like how you think and the way you represent your views in this article. We are Best CRM Software in Mumbai.

    ReplyDelete
  17. Packers and Movers Bangalore as a Services providing company can make all the difference to your ###Home Relocation experience. Bangalore based Company which offers versatile solutions, Right team that easily reduce the stress associated with a ???Household Shifting, ***Vehicle Transportation. we help things run smoothly and reduce breakages and offer you seamless, Affordable, Reliable Shifting Services, Compare Shifting Charges
    Packers And Movers Bangalore

    ReplyDelete
  18. Packers and Movers Hyderabad Give Certified and Verified Service Providers, Cheap and Best ###Office Relocation Charges, ***Home Shifting, ✔✔✔Goods Insurance worth Rs. 10,000, Assurance for Local and Domestic House Shifting. Safe and Reliable Household Shifting Services in Hyderabad with Reasonable Packers and Movers Price Quotation @ Packers And Movers Hyderabad

    ReplyDelete
  19. Valuable post useful for everyone.Keep on sharing.
    MS Dynamics AX Online Training

    ReplyDelete
  20. I have read your blog post on. I am very much pleased with the contents you have mentioned. We are one of the Best SEO Company in Delhi | SEO Company in Noida | SEO Company in Lucknow.

    ReplyDelete
  21. This is really a very good blog and thanks for sharing it with the community!Keep Posting Many Blogs Like this.
    crm software development company in chennai

    ReplyDelete
  22. Packers and Movers Gurgaon Provide Reliable, Safe and Certified Service Provider list, Get Free ***Best Price Quotaition and Compare Charges. ???Hassle free Household Shifting Services, High Quality packing Material, Office Relocation, Car Transportaion, ###Local and Domestic Shifting Service @
    Packers And Movers Gurgaon

    ReplyDelete
  23. Get Shifting/Relocation Quotation from ###Packers and Movers Delhi. Packers and Movers Delhi 100% Affordable and Reliable ***Household Shifting Services. Compare Transportation Charges and Save Time, Verified and Trusted Packers and Movers in Delhi, Cheap and Safe Local, Domestic House Shifting @
    Packers And Movers Delhi

    ReplyDelete
  24. Great blog article informative I liked it

    Best QA / QC Course in India, Hyderabad. sanjaryacademy is a well-known institute. We have offer professional Engineering Course like Piping Design Course, QA / QC Course,document Controller course,pressure Vessel Design Course, Welding Inspector Course, Quality Management Course, #Safety officer course.
    QA / QC Course
    QA / QC Course in India
    QA / QC Course in Hyderabad

    ReplyDelete
  25. Nice information on here, I would like to share with you all my experience trying to get a loan to expand my Clothing Business here in Malaysia. It was really hard on my business going down due to my little short time illness then when I got heal I needed a fund to set it up again for me to begin so I came across Mr Benjamin a loan consultant officer at Le_Meridian Funding Service He asked me of my business project and I told him i already owned One and i just needed loan of 200,000.00 USD he gave me form to fill and I did also he asked me of my Valid ID in few days They did the transfer and my loan was granted. I really want to appreciate there effort also try to get this to anyone looking for business loan or other financial issues to Contact Le_Meridian Funding Service On Email: lfdsloans@lemeridianfds.com / lfdsloans@outlook.com He also available on WhatsApp Contact:+1-9893943740.

    ReplyDelete
  26. This comment has been removed by the author.

    ReplyDelete
  27. It was a great information and Its really worth reading it.
    MS Dynamics Trade and Logistics Online Training

    ReplyDelete

  28. Packers and Movers Ahmedabad - We Provide ***Best Service Providers, Safe, Reliable, Affordable, Trusted ###Movers and Packers in Ahmedabad List, Household Shifting, Office Relocation: Choose Top Verified Packers and Movers Ahmedabad Compare ???Shifting Service Chrages, Price Quotation, Rate List Charts and Save Money and Time @ Packers and Movers Ahmedabad

    ReplyDelete

  29. If you want to get information about the job notification, exam and interview dates, and Sarkari Result. you will get many websites of the Government of India. You can easily find out the result for any Government examination.
    mandi parishad sarkari result |
    vdo admit card sarkari result |
    up shiksha mitra result 2013 |
    bpsssc |
    shiksha mitra btc result |
    sbi po sarkari result |

    ReplyDelete
  30. If you want to get information about the job notification, exam and interview dates, and Sarkari Result. you will get many websites of the Government of India. You can easily find out the result for any Government examination.
    dfccil sarkari result |
    navy mr admit card 2019 sarkari result |
    rajasva nirikshak admit card |
    ssc chsl 2019 sarkari result |
    uppsc upper subordinate 2016 answer key |
    cpo sarkari result |
    shiksha mitra second semester exam result |
    kvs admit card sarkari result |
    sarkari result up iti |

    ReplyDelete
  31. Wow! this is Amazing! Do you know your hidden name meaning ? Click here to find your hidden name meaning

    ReplyDelete
  32. Intelepos takes pride in offering efficient Epos system for takeaway to keep your business at the top of the competition. This system easily manages your staff, menu, clients, and sales during peak business hours. Our professional team brings innovation to cover all aspects of your business. To increase your customer base and profits contact us today.
    EPOS System for Takeaways
    EPOS System in UK
    EPOS System Lonodn
    EPOS System Nottingham

    ReplyDelete
  33. Get Packers and Movers Jaipur List of Top Reliable, 100% Affordable, Verified and Secured Service Provider. Get Free ###Packers and Movers Jaipur Price Quotation instantly and Save Cost and Time. Packers and Movers Jaipur ✔ ✔ ✔ Reviews and Compare Charges for household Shifting, Home/Office Relocation, ***Car Transportation, Pet Relocation, Bike SHifting @ Packers And Movers Jaipur

    ReplyDelete
  34. Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming article @ Local Packers And Movers Bangalore

    ReplyDelete
  35. Thanks for sharing Such a valuable information.Im very thankful to You That You Had Given Me This opportunity to write on This blog.please visit our website I Assure You That it will be very useful for @ Packers And Movers Gurgaon

    ReplyDelete
  36. Hey, Wow all the posts are very informative for the people who visit this site. Good work! We also have a Blog.Please feel free to visit our site. Thank you for sharing.
    @ Packers And Movers Bangalore

    ReplyDelete
  37. Packers and Movers Chennai Give Safe and Reliable ***Household Shifting Services in Chennai with Reasonable ###Packers and Movers Price Quotation. We Provide Household Shifting, Office Relocation, ✔ ✔ ✔ Local and Domestic Transportation Services, Affordable and Reliable Shifting Service Charges @ Packers And Movers Chennai

    ReplyDelete
  38. Thanks for sharing Such a valuable information.Im very thankful to You That You Had Given Me This opportunity to write on This blog.please visit our website I Assure You That it will be very useful for @ Packers And Movers Delhi
    Packers And Movers Greater Noida
    Packers And Movers Noida
    Packers And Movers Ghaziabad

    ReplyDelete
  39. Hey, Wow all the posts are very informative for the people who visit this site. Good work! We also have a Blog.Please feel free to visit our site. Thank you for sharing.
    @ Packers And Movers Delhi

    ReplyDelete
  40. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! Local Packers And Movers Bangalore

    ReplyDelete
  41. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.
    ALL University BCOM 1st, 2nd & Final Year TimeTable 2020

    ReplyDelete
  42. Thanks for sharing information
    "Pressure Vessel Design Course is one of the courses offered by Sanjary Academy in Hyderabad. We have offer professional
    Engineering Course like Piping Design Course,QA / QC Course,document Controller course,pressure Vessel Design Course,
    Welding Inspector Course, Quality Management Course, #Safety officer course."
    Piping Design Course
    Piping Design Course in India­
    Piping Design Course in Hyderabad
    Welding Inspector Course
    Quality Management Course
    Quality Management Course in india
    Safety officer course

    ReplyDelete
  43. Nice Post
    We are the best piping design course in Hyderabad, India. Sanjary academy Offers Piping Design Course and Best Piping Design Training Institute in Hyderabad. Piping Design Institute in India Piping Design Engineering.
    Piping Design Course
    Piping Design Course in india
    Piping Design Course in hyderabad

    ReplyDelete
  44. I really enjoyed your blog Thanks for sharing such an informative post.

    Microsoft Dynamics 365 Services

    ReplyDelete

My Name is..