Script fails after document has been locked

Avatar

Avatar
Level 1
Mike_Senger
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
Mike_Senger
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile
Mike_Senger
Level 1

02-01-2019

Hi ,

new to this, so please bare with me....

i created a document in LC ES 8.2.1.3144....

it works fine until i sign it electronically.

The issue occurs not after signing, but after locking parts of the document.​

After that i get the Following message:

LC error after signing.JPG

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

06-01-2019

Since your scriptings still execute after you have locked your form, you running into the described scenario. To avoid that you'll have to put your scripts into an if expression, so they do execute only under specific circumstances.

Sample 1: Use the value of a (hidden) reference field

// Only execute script when value of reference field is "0"

if (myReferenceField eg "0") then

    $ = Sum(Price1, Price2, Price3, Price4, Price5, Price6)

endif

Sample 2: Use a fields property

// Only execute script if this field is not locked

if ($.access eq "open") then

    $ = Sum(Price1, Price2, Price3, Price4, Price5, Price6)

endif

Answers (0)