2

Is there a way to suppress/handle the "Record Unavailable" exception using a plugin/JavaScript. When a user tries to open a record that no longer exists, I want implement a custom process to proceed. We are using Dynamics CRM 365.

Thanks in advance

noobie
  • 2,427
  • 5
  • 41
  • 66
  • How are the users accessing records that are no longer available? Stale screen? or do they get this exception when trying to access records that exist? – dynamicallyCRM Jan 19 '17 at 23:50
  • The view is stale. I know a quick work around is to refresh view, but there is a specific requirement to handle a situation where the record no longer exists and they try to access it. – noobie Jan 20 '17 at 00:02
  • Online you have no options. On prem you could probably find some way to modify the error page that gets served up. Unsupported of course. – Polshgiant Jan 20 '17 at 00:40
  • Where/when in the UI do you need to intercept the error message? – Henk van Boeijen Jan 20 '17 at 17:39
  • When the user opens the record from a view or subgrid. – noobie Jan 21 '17 at 09:04
  • 2
    If the records are not available how are you going to handle it ? If you want to show user a custom message, then the "Record Unavailable" standard message is fine. If you really want a solution, refresh the view you can try a retrieve plugin, if it works for you ? https://community.dynamics.com/crm/b/algrapsblog/archive/2014/09/24/crm2011-retrieve-plugin – Dot_NET Pro Jan 27 '17 at 10:35
  • Thanks, I managed to get it to work but using the retrieve message. It is not pretty but will do for the mean time. – noobie Jan 29 '17 at 22:30

1 Answers1

1

Implemented a workaround using a similar approach outlined in this article. Essentially, I check to see if the record exists in the retrieve message and then trigger a custom action if it did does not exist anymore i.e recreate the record.

https://ameedsheikh.wordpress.com/2015/08/24/integrate-lob-data-details-in-crm-without-loading-large-data-volumes/#comment-178

noobie
  • 2,427
  • 5
  • 41
  • 66