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 (){
}
}
})();
*This post is locked for comments
I have the same question (0)