Quantcast
Channel: CRM Development Forum
Viewing all articles
Browse latest Browse all 888

JScript error, the value of the property

$
0
0

I have looked through other threads and I couldn't find any that fixed mine so I made a profile to post this. I get the popular error 'Error: the value of the property 'ClientID' is null or undefined, not a Function Object'. The event has the function filled out as ClientID and is using the library web resource.

The main thing im not sure about is that I don't know if DataValue for office is meant to be set like that, but because i took this script from another entity and wanted to modify it to work in the same way and there is no datavalue such as '10000000000' for the different set offices I dont know what else to set it other than actual values that are in the 'sites' under administration. Would this cause the error I'm getting?

function ClientID ()
{
   if (crmForm.all.new_officeid.DataValue==Sydney)
   {
         crmForm.all.new_clientidgc.style.display='';
         crmForm.all.new_clientidsyd.style.display='GC{GC}';
crmForm.all.new_clientidgc.DataValue='';
Xrm.Page.getAttribute("new_clientidsyd").setRequiredLevel("required");
Xrm.Page.getAttribute("new_clientidgc").setRequiredLevel("none");
   }
   else if (crmForm.all.new_officeid.DataValue==Gold Coast)
   {
         crmForm.all.new_clientidgc.style.display='none';
         crmForm.all.new_clientidsyd.style.display='SYD{SYD}';

crmForm.all.new_clientidgc.DataValue='';
Xrm.Page.getAttribute("new_clientidsyd").setRequiredLevel("required");
Xrm.Page.getAttribute("new_clientidgc").setRequiredLevel("none");
   }
  else
  {
         crmForm.all.new_clientidgc.style.display='none';
         crmForm.all.new_clientidsyd.style.display='none';

  }
}


Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>