Save As then a Save prompt will appear

Avatar

Avatar
Validate 1
Level 1
esdigrap
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
esdigrap
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
esdigrap
Level 1

27-02-2020

Good day!

 

I have form with cancelAction preprint code and it will depend on the value of a certain hidden field. My problem is, every time I signed it (of course a save as dialog box will appear) and when I try to close the form, a SAVE prompt will appear. How can I automate or is there any script that I can put on my form. Does app.execMenuItem("Save"); works or any similar?

Look at these screenshot
Before signing

esdigrap_1-1582817148285.png

After signing

esdigrap_0-1582817121909.png

After closing the form

esdigrap_2-1582817197650.png

This is the code in the change event of my signature fields

 

var oState = event.target.getField("form1[0].page2[0].H[0].Row3[0].cwm_sig[0]").signatureValidate();

if (oState != 0)  {       

     oTargetField = this.resolveNode("sig1");

          oTargetField.rawValue = "1";

}

else {

     oTargetField = this.resolveNode("sig1");

          oTargetField.rawValue = "0";

}

 

Hierarchy

esdigrap_3-1582817425210.png

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

27-02-2020

It's correct that the save dialog appears, because after signing the form, you're changing the value of "sig1" which makes the form dirty again. You can suppress the save as with the following script.

 

event.target.dirty = false;

 

Answers (0)