Readers Field via Script

I'm having a strange problem when populating a Readers field via script. I'm loading external data to a Notes DB & need to secure documents via a Readers field. In script I build an array of Roles allowed to see the document & store it in a Readers field. But everyone can view the document until I edit & save it within the UI. After saving it, only the appropriate Roles can access it & it works as expected.

Is there some special way to populate a Readers field via script that I'm missing? What's so magical about the UI that would cause an already populated Readers field to behave as one, even though I haven't changed a thing?
RayboneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kobluckiCommented:
Before you do a backend document save doc.save(true,false,false)
do
append the values to the field then
set item=doc.getfirstitem("Reader field name")
item.isreaders=true
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RayboneAuthor Commented:
This did the trick. Thanks so much. I also see the IsNames & IsAuthors properties that will help me. I guess you just need to know where to look.

Thanks Again
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.