Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Delete Data Connection for merged record form via scripting

$
0
0


I have a livecycle designer form connected to a OLEDB data base (data base connection name is MailMerging).

 

This form is required to merge multiple fields of data and then create new forms to be distributed for each client to fill in and return.

 

I have a button on the form which loops through the records, saves the form for each record and makes the mail merging buttons invisible to the end user.

 

This part of the script works ok.

 

I need for the data connection to be deleted/disabled for the newly generated forms which are to be issued to the client.

 

I used the xfa.sourceSet.MailMerging.close(); type of javscript but when the newly generated form is opened the data connection is still there.

 

Can anyone please provide assistance in how to correctly remove the data connection via scripting, any help most appreciated.

 

thank you.

 

Script as follows for the Merge records button:

 

var count = 0;

while (!xfa.sourceSet.MailMerging.isEOF())

{

\\  Make merging buttons invisible

First.presence = "invisible";

Next.presence = "invisible";

Previous.presence = "invisible";

Last.presence = "invisible";

Mergebutton.presence = "invisible";

 

\\ this is the part that does not work the data connection is still connected in the saved form

xfa.sourceSet.MailMerging.close();

 

\\ saves the record as a new form (this is part of a folder level script)

event.target.savemydocs(event.target);

 

count++;

 

xfa.sourceSet.MailMerging.next();

}


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>