Consultor Eletrônico



Kbase P95398: JavaScript API fails on the web with dynamics
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.0B
Dynamics

SYMPTOM(s):

api fails on the web with dynamics

Calling API supplied with dynamics from WebUI

highlightWidget api fails on the web with Dynamics

Call to api is correct, for example:
var lRet;
function btnHighlight(){
lRet=apph.logic.highlightWidget('customerviewv.country','warn');
}

highlightWidget is defined in <OpenEdge install>\tty\dynamics\ry\dhtml\rylogic.js

Error is raised in Internet Explorer at run time:

Error: Object expected

CAUSE:

The problem is that the apph event is not being referenced in the function/s in rylogic.js

FIX:

Add a reference to apph event in the function:
1. Open <OE install>\tty\dynamics\ry\dhtml\rylogic.js
2. Find function that you are using (or change them all as all are missing the apph), for example for highlightwidget:
Logic.prototype.highlightWidget=function(flds,typ){
switch (typ) {
case 'err': typ='error';
case 'info': typ='information';
case 'warn': typ='warning';
default: typ='';
}
var f=flds.split(',');
for (var i=0;i<f.length;i++){
alert("Fix is here (rylogic.js - added 'apph.')");
apph.action(this.setWidgetPrefix(f[i])+'.mark|'+typ);
// action(this.setWidgetPrefix(f[i])+'.mark|'+typ);
}
return true;
}
3. Ensure rylogic.js is removed from the local PC's Temporary Internet Files directory as this will have a cached copy of the incorrect file.