0

I have a JS function that is running on a custom button that is visible on a View not a form.

The function requires XrmServiceToolkit to complete it's purpose, therefore on the ribbon workbench on my custom button I added a action to call the XrmServiceToolkit library, but there needs to be a function name.

Does anyone know the correct way to get this working

Thanks

Sjharrison
  • 729
  • 3
  • 16
  • 39

1 Answers1

1

My favorite "dummy" function for this purpose is isNaN

<JavaScriptFunction FunctionName="isNaN" Library="$webresource:myjslib" />
Alex
  • 23,004
  • 4
  • 39
  • 73
  • hi @Alex - I found an example where this had been used, however this threw a different error stating that `XrmServiceToolkit.REST.retrieveRecord requires the errorCallback parameter is a function.` – Sjharrison Apr 01 '15 at 12:56
  • 1
    The error is unrelated, you have a bug where you invoke `retrieveRecord`. The fact that the error pops up means the library is being loaded correctly. – Alex Apr 01 '15 at 13:19