コミュニティ

IDocument Repair

Hi All,

According to the help files IDocument Repair Updates the Document Definition to the latest version. I have a scenario where I'd like to update documents either when the batch is opened or when the document is opened. Can someone please give me an example of the code and where to put it within an event handler or similar?

Thanks

Richard

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

3件のコメント

  • Avatar
    Permanently deleted user

    Hello Richard,

    We propose the following solution:

    On the Verification Stage in the On Task Window Create event handler paste the following script:

    foreach(IDocument doc in TaskWindow.Batch.Documents) 

    {

        TaskWindow.OpenDocument(doc);

        doc.Repair();

        TaskWindow.CloseDocument(doc);

    }

    I have tested it and it updates the definitions every time the operator receives the task on Verification station. 

    Please note that this script will work in the following conditions:

    1. You are verifying the full batches.

    2. You do not use the document sets

    Otherwise the script needs modifications.

    Hope this helps.

    Alexey

     

    0
  • Avatar
    Permanently deleted user

    Hi Alexey,

    Thank you for this and sorry for the delay in replying, when implementing I get error 'No overload for method repair' error message, should it have arguments?

    Thanks

    Richard

    0
  • Avatar
    Permanently deleted user

    Hello Richard.

    What is your FC version? (Project Setup Station > Help > About)

    Alexey

     

    0

サインインしてコメントを残してください。