You are viewing limited content. For full access, please sign in.

Question

Question

Workflow Script to Remove All Sticky Notes

asked on December 10, 2015

Hello,

I have a script that works with LFSO to remove all sticky notes automatically in Workflow.  Does anyone have one that they would share that uses RepositoryAccess instead of LFSO to achieve the same thing?  I appreciate it! 

0 0

Answer

SELECTED ANSWER
replied on December 10, 2015

This should do the trick:

public class Script1 : RAScriptClass91
    {
        protected override void Execute()
        {
            using (DocumentInfo di = new DocumentInfo(BoundEntryId,RASession))
            {
                List<AnnotationBase> anns = (List<AnnotationBase>)di.GetAnnotations();
                foreach(AnnotationBase ann in anns)
                {
                    if (ann.AnnotationType == AnnotationType.Note) Annotation.Delete(ann.EntryId,ann.PageNumber,ann.ItemId,RASession);
                }
                di.Save();
            }
        }
    }

 

0 0

Replies

replied on December 18, 2015

Did the above code work for you?

0 0
replied on December 21, 2015

Hello Chris,

Thanks for checking back in.  I'm sorry I got busy on another project and should be able to get back to this one and let you know within the next week.  I really appreciate you following up and I will let you know asap.

 

THANKS AGAIN

0 0
replied on December 21, 2015

Could you mark the question as answered so Chris can get points for being helpful?

You are not allowed to follow up in this post.

Sign in to reply to this post.