Leaving Page During a RetrieveMultiple call

Oct 10, 2014 at 3:21 AM
Hi,

I was wondering if there is a way to handle the error generated when leaving a page while waiting for an asynchronous retrieveMultiple call?

Currently when I load an entity I make a retrieveMultiple call which takes a little while. If the user leaves the page before the asynchronous task completes then an error message appears.

Is there anyway to catch and ignore this error? Other than turning off error messages inside CRM 2013.
Coordinator
Oct 13, 2014 at 2:23 PM
Hi There.

RetrieveMultiple is quite slow in terms of performance by nature. I would recommend trying another method like Fetch, QueryByAttribute to achieve this as a workaround.

Also thinking if asynchronous method is ideal for your scenario.

Kind Regards,
Jaimie
Oct 13, 2014 at 11:54 PM
Hi,

Thanks for your response. Asynchronous is required due to time it takes for the call to finish and I didn't want the page to be frozen.

Have you got any benchmarks for the performance of Fetch or QueryByAttribute vs RetriveMultiple?

Thanks.
Oct 14, 2014 at 12:02 AM
Here is a description of what I am doing. Can you suggest the quickest way to handle this please:

I need to retrieve all records for a certain entity, I only require 2 fields from the records though. The name and the id. Can QueryByAttribute be used to retrieve all records?
Oct 14, 2014 at 1:32 AM
Thanks for the help. I have solved this with Fetch. It is so much faster than retrieveMultiple.