Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Javascript

$
0
0

Hello there first thank you for looking into this. I am trying to define my javascript using namespace and $self.

I am also trying to define my fields using  

var $self = FIELD = {
		AccountName: "new_accountname",
		RelationType: "new_relationtype"
	};

When I try to run this code on the form I am getting an error, the error is (

One of the scripts for this record has caused an error. For more details, download the log file.
TypeError: Unable to get property 'onLoad' of undefined or null reference at eval code (eval code:1:1))

//JavaScript source code

if (typeof CONTOSO == "undefined") {
	CONTOSO = {_namespace: true};
}

CONTOSO.Account = (function() {
	var $self = {};
	
	var $self = FIELD = {
		AccountName: "new_accountname",
		RelationType: "new_relationtype"
	};
	$self.onLoad = function () {
		showHide(FIELD.AccountName, FIELD.RelationType);
	}
	
	$self.FIELD.AccountName = function () {
		showHide(FIELD.AccountName);
	}
	
	function showHide() {
		if (){
			
		}
		else if (){
			
		}
	}
})();
 

Viewing all articles
Browse latest Browse all 46379

Trending Articles



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