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?