0 Replies Latest reply on Oct 24, 2014 4:12 AM by mircea.nicolae

    how do you checkOut a story in indesign server?

    mircea.nicolae

      I'm trying to change the content of an opened indesign document (opened in indesign server)

      Using the javascript I managed to change the content of several paragraphs when the parent story's lockState is NONE.

      BUT, if the lockState is CHECKED_IN_STORY I run into some trouble

      if(story.lockState==LockStateValues.NONE)

           paragraph.contents=foundContent;

      else

      {

           alert(story.lockState);

           //story.remove();

           story.checkOut();

           paragraph.contents=foundContent;

           story.checkIn();

           story.recompose();

      }

      If I try to change the content I will get an error message saying that the "Object is locked" without a reference to the type of the object that is locked. If I try to first checkOut the story, the execution will stop at that line with a message like "User canceled this action".

      What is strange is that a story.remove() will work as expected and delete the story regardless of its lock state.

      Any ideas?

      Thanks