Tuesday 30 June 2015

The difference: Xrm.Page.data.refresh() vs Xrm.Utility.openEntityForm(entityName, id) in Practice

Brief post here, Assuming, in the ribbon, I have successCallback function that will refresh the form.
Then, in the form onLoad I have script to show Form Notification.

Now, I want to research the difference of those function usages.

image

Now, In the Submit Button SuccessCallback() I have specified one is using .refresh() and another one is using the .openEntityForm()

Xrm.Page.data.refresh()

What happened after I put it in the code?

image

It is just refreshing the Form like a modal popup async and it is fast!

image

But..It does not trigger my notification onLoad(), it did not reload the whole form.

Now, the second research:

Xrm.Utility.openEntityForm()

image

Well, it is really refreshing and reloading your form, like you were opening a new window of entity record.

image

And here is the result after it comes back.

image

*My Notification which i put in the formLoad is appearing, different from the first function result I used before.

Hope this can make you clear which function you’d like to use!

As I know, both are also refreshing the ribbon without additional ribbon refresh function based on my research.

*additional one on 19 October 2015
the Xrm.Page.data.refresh() function will not refresh the whole thing, so you might find that the footer is not updated like this:



Thanks!

18 comments:

  1. Great post, it's good to know the options when refreshing in Javascript

    keep up the great blog posts

    ReplyDelete
  2. Really helpful. Thanks for the research.

    ReplyDelete
  3. It also does not refresh the Business Process Flow (in CRM 2016 Online). Any ideas?

    ReplyDelete
  4. Add a modifiedon attribute and attach your onload event to that

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

    ReplyDelete
  6. Amazing Artice Written. I am very much glad to read your article.
    I am Following Your From Last 6 Month- Brother and really linking the stuff
    you post on your blog on Regular Basis.
    Keep Posting blogs like this….. Thanks alot

    WhatsApp API Integration

    ReplyDelete
  7. amzing article , really i like this blog we also provide service like this Integrate WhatsApp with Tally

    ReplyDelete
  8. This is really a very good article. Thanks for taking the time to discuss with us, I feel happy about learning this topic. keep sharing your information regularly for my future reference. if you look out this our WhatsApp API Services. if any thing you need then please visit us https://umstechlabs.com/whatsapp-api-integration

    ReplyDelete
  9. Amazing post... It's helpfull...Thanks alot!!!!
    Creative Graphic Design

    ReplyDelete
  10. We are offering Best Python Course in Bangalore with Placement Assistance. Get trained by Industry Experts with Real Time Projects. Learn Python from basics to advanced Concepts. Please visit our website to know more information.
    https://onlineidealab.com/python-training-in-bangalore/

    ReplyDelete
  11. Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share. Private Utility Locating Services in Washington DC

    ReplyDelete
  12. We Rise GOC is a rising name in the Real Estate Market. Members of We Rise GOC’s aim to be a recognized leader for innovation and excellence in the Real Estate industry. The company has one of the most engaged workforce because we always put our people first. We offer exciting opportunities to benefit from, for both our clients and work force.

    ReplyDelete
  13. Very interesting blog. A lot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definitely interested in this one. Just thought that I would post and let you know.
    car transport solutions
    open vehicle transport

    ReplyDelete
  14. I received a quote within minutes. It was arranged for pick-up and transportation three days later. The right driver was assigned. My whole experience with this shipping company was so simple. We tracked everything from the beginning until after I received the car. Many thanks.
    Door to Door Auto Transport
    Inoperable Auto Transport

    ReplyDelete
  15. The ICSI clinics in Islamabad and Rawalpindi are equipped with the latest diagnostic equipments and solutions that are available in world-class clinics. They offer fullyequipped operation theatres, ultrasound rooms, and consulting and counseling rooms. Patients are accommodated in private rooms with en-suite bathrooms, as well as round-the-clock nursing care. The Best IVF Center in Pakistan is Australian Concept Infertility Medical Center.

    ReplyDelete
  16. The symptoms of an ectopic pregnancy are the same as those of a normal pregnancy, with the exception that the bleeding may be red, brown, or watery. The bleeding may also be heavier than usual. This irregular and prolonged bleeding should be investigated. Patients with these symptoms should be referred to the Early Pregnancy unit for testing. It is important to note that this type of bleeding may be confused with normal periods. The Best IVF Center in Pakistan is Australian Concept Infertility Medical Center.

    ReplyDelete
  17. When it comes to male infertility, it is important to see a urologist who specializes in reproductive medicine. This physician will perform a full medical and sexual history to determine the cause of infertility. Testing may include sperm analysis, genetic testing, and hormone blood tests. The physician may also suggest hormone therapy or surgery. Australian Concept is a best center for Azoospermia Treatment

    ReplyDelete

My Name is..