S
stallwoe
Hey folks,
I am having a big problem on a application being pushed out
to a client. The Infopath form in question uses a ton of JScript
objects, getters, setters, etc... The error I'm encountering is:
"Object: doesn't support this property or method" This error occurs on
a small method that's not doing much but getting information from a
form using a getter and comparing it to a string value. Below is the
code:
//=============
//gets Priority
//=============
function get_priority(){
var priority;
priority =
XDocument.DOM.selectSingleNode("/my:RFCDetails/my:GeneralInfo/my:RFCPriority");
return priority;
}
//==============================
//Button Initializer (Important)
//==============================
function buttonInitializer(){
var iPriority;
var iCategory;
var iStatus;
var iMileStone;
var iRole;
iPriority = get_priority();
iCategory = get_category();
iStatus = get_status();
iMileStone = get_mileStone();
iRole = get_UserRole();
if(iCategory == "1" && iStatus == "2" && iMileStone == "0" && iRole
== "IMRFC-CM"){
checkApproval();
set_ApprovalID(1);
}else if(iStatus == "2" && iMileStone == "0" && iRole ==
"IMRFC-CM"){
checkApproval();
set_ApprovalID(2);
}else if(iStatus == "4" && iMileStone == "1" && iRole ==
"IMRFC-CAB"){
checkApproval();
set_ApprovalID(3);
//error happens at this if else statement below (ipriority ==...)
}else if(iPriority == "4" && iStatus == "2" && iMileStone == "2" &&
iRole == "IMRFC-eCAB"){
checkApproval();
set_ApprovalID(4);
}else{
uncheckApproval();
set_ApprovalID(0);
}
}
Generally all the getters use the same logic as seen in the one above.
I've pin pointed it to the iPriority variable which receives a string
from the form. For some reason it seems to get through the case
statement until the iPriority variable gets involved.I understand this
is a fair bit of code, but we're implementing about a thousand lines of
logic in infopath Jscript (maybe not the best idea). If anyone has any
insight I would appreciate it a lot. Thanks
Eric
I am having a big problem on a application being pushed out
to a client. The Infopath form in question uses a ton of JScript
objects, getters, setters, etc... The error I'm encountering is:
"Object: doesn't support this property or method" This error occurs on
a small method that's not doing much but getting information from a
form using a getter and comparing it to a string value. Below is the
code:
//=============
//gets Priority
//=============
function get_priority(){
var priority;
priority =
XDocument.DOM.selectSingleNode("/my:RFCDetails/my:GeneralInfo/my:RFCPriority");
return priority;
}
//==============================
//Button Initializer (Important)
//==============================
function buttonInitializer(){
var iPriority;
var iCategory;
var iStatus;
var iMileStone;
var iRole;
iPriority = get_priority();
iCategory = get_category();
iStatus = get_status();
iMileStone = get_mileStone();
iRole = get_UserRole();
if(iCategory == "1" && iStatus == "2" && iMileStone == "0" && iRole
== "IMRFC-CM"){
checkApproval();
set_ApprovalID(1);
}else if(iStatus == "2" && iMileStone == "0" && iRole ==
"IMRFC-CM"){
checkApproval();
set_ApprovalID(2);
}else if(iStatus == "4" && iMileStone == "1" && iRole ==
"IMRFC-CAB"){
checkApproval();
set_ApprovalID(3);
//error happens at this if else statement below (ipriority ==...)
}else if(iPriority == "4" && iStatus == "2" && iMileStone == "2" &&
iRole == "IMRFC-eCAB"){
checkApproval();
set_ApprovalID(4);
}else{
uncheckApproval();
set_ApprovalID(0);
}
}
Generally all the getters use the same logic as seen in the one above.
I've pin pointed it to the iPriority variable which receives a string
from the form. For some reason it seems to get through the case
statement until the iPriority variable gets involved.I understand this
is a fair bit of code, but we're implementing about a thousand lines of
logic in infopath Jscript (maybe not the best idea). If anyone has any
insight I would appreciate it a lot. Thanks
Eric