Calling functions in other JScript.Net files

Hi

 

I have a procedure that uses two libraries. Each of the Libraries contains a single JScript.Net file. One is for accessing custom configuration values and the other is for looking up Active Directory.

 

In the procedure I have a JScript.Net file also. Is it possible to call functions in my Configuration and Active Directory script files from the procedure JScript.Net file. I've tried importing the namespaces of my library scripts into the procedure script but it doesn't work. I've also tried fully qualifying the method name. Either way the script will not validate and therefore not publish.

 

In my situation the two library scripts are used to get the a user's email address and send them an email based on a template in the custom configuration. I know I could retrieve the values I want from the library scripts into custom variables and then pass them into my procedure script functions as parameters it would be easier to just copy and paste the library script functions into my procedure script, which pretty much makes the libraries worthless, except as code repositories.

 

Thanks

Tagged:

Comments

  • You could always call ework.Script (or ework.ScriptEval) to call the other script.

  • Version 7, ah that takes me back!

     

    This was always a problem with v7 that namespaces from other server-side scripts would not validate but so long as they were correct you could ignore them.

     

    The reason you cannpt publish is likely to be becasue of your publish settings in designer. Go into the options and set designer so that you can ignore validation errors when publishing.

     

    Hope this helps.