on 10-10-2011 5:27 PM
Hello,
I am trying to write a toolbar script, but my script does not seem to get executed at all.
I added a script to RFXs, it shows up under Scripts, but none of the log messages appear in the log, I even tried throwing an application exception in the script, but it does not work. Can anyone please help?
Thanks,
MP
Scripting Context:Toolbar
External ID:TestRFX
Application Context:Company Context
Display Name:Test RFX
Description:
Script Version:
Class:RFx(900)
Instance Type:Any
Document Type:Any
Toolbar Key:ABC2
Toolbar Name ID:This is a test
Toolbar Description ID:
Toolbar Script Visibility:View or Edit Mode
Script:
import com.sap.odp.api.common.*;
import com.sap.eso.api.rfx.*;
try{
logMsg = Logger.createLogMessage(session);
logMsg.setLogMessage("***** MP test toolbar script");
Logger.info(logMsg);
doc.setDisplayName("Script worked");
throw doc.createApplicationException("INT_CATEGORY", "Error Message");
}
catch(e){
throw doc.createApplicationException(null,e.getAssociatedAttribute()"-"e.getMessage());
}
Hi MP,
I did not get any wrong in the script other than the catch statement:-
catch (Exception e).Just try the script with this and let me know.
Thanks,
Ankur Goyal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankur,
I did make the change you suggested, thank you.
I think though, the issue is in my environment. I had other scripts which were not working. I tried them without try catch blocks also. Nothing was working yesterday, and today suddenly everything is working.
Thanks a ton for your help.
Regards,
MP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.