Using script and a .NET assembly in the same form

  • Thread starter Jesse R Anderson
  • Start date
J

Jesse R Anderson

I have a pretty simple question: Can I use both script and a .NET assembly in
the same form to capture events? I want to capture the Save event in the .NET
assembly and the Load event in the script.

I am able to successfully put the files (*.dll and *.js) into the XSN and
make the entries in the XSF, but the form seems to only use the .NET
assembly, i.e., my OnLoad doesn't fire in the script.

Any help greatly appreciated.

Thanks,
- Jesse
 
J

Jesse R Anderson

Nothing, to answer your second question first... It's more a matter of what
the code does and who writes it.

My project uses approx 350 InfoPath forms. We attach what we call a "Save As
Cloaker" to each of these forms through a custom process where we EXTRACT.EXE
the XSN, add the .NET DLL the Save event is defined in, add the necessary
entries to the XSF, and MAKECAB.EXE the XSN again. The purpose of the Save As
cloaker is simply to create a folder structure, or navigate to it if it
already exists, based on form content (such as customer number), so the user
simply has to press "OK" when the normal Windows Save dialog comes up. We
want to attach this same exact functionality/code to every one of the 350
forms.

The functionality we need in the OnLoad event only applies to 3 of the 350
forms and is written by the form developer per form, being unique to each
form. It basically automates the creation of a certain number of repeating
rows for a given repeating table.

So if the answer to my original question is "no", then we either need to
move the Save As functionality to script for these 3 forms, or have 3
additional alternate versions of our original .NET DLL that also handles the
OnLoad event - which is specific to each of the 3 forms. We don't want to
have to do this if possible.

- Jesse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top