I took this from the client script utilities in the Validators.
function csValidateFormExists(strValue) {
try {
var ids = lims.CallServer("Enterprise_Data_Providers.FormProvider.GetIds", strValue.Split("."));
return ids && ids.length >= 3;
}catch(e) {
return false;
}
}
I find it very useful to check to make sure the form I'm about to call actually exists. Especially when I am jumping applications.
No comments:
Post a Comment