0

I'm trying to access Xrm.Utility from my C# Web Application. I've downloaded Microsoft.CrmSdk packages from NuGet, and have these references at the top of my C# code:

using Microsoft.Crm.Sdk;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Xrm.Tooling;

Unfortunately, in my code I cannot see Utility anywhere. When use intellisense to help, I do see the references to the ones I've references (please see attached screenshot).

enter image description here

How can I get Microsoft.Xrm.Utility? I've searched NuGet and cannot find it.

Btw, these are the functions I'm needing - https://learn.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-utility

Rodney Ellis
  • 727
  • 2
  • 13
  • 28

1 Answers1

1

Xrm.Utility (Client API reference) - as the name suggests this is Client API method, used in javascript for Form scripting. Simply you can use it in web resource.

That being said, you cannot use (expect) that in C# server side coding like console app or CRM Plugin development.

  • Thanks Arun. and sorry, I'm a database guy who's been lumped with this :'( Do you know of any examples of how to use it? I've got a Webform which is working perfectly, except I need to be able to access Xrm.Navigation.openForm – Rodney Ellis Dec 23 '19 at 21:58
  • 1
    @RodneyEllis if your webform is rendered as webresource inside CRM, then parent.Xrm.... or opener.Xrm will work based on embed or popup behavior.. https://stackoverflow.com/a/49698190/7920473 – Arun Vinoth-Precog Tech - MVP Dec 23 '19 at 22:00