Ab wann wirkt eine Änderung am item Authors

  • Hallo,


    ich habe einen Workflow, in dem ein per Authors Feld berechtigter Mitarbeiter beim Weitersenden sich die Author Rechte selber nehmen soll, leider scheint die Änderung aber zu früh zu greifen, wodurch er die weiteren Änderungen nicht mehr erstellen darf. Was mache ich falsch??


    Code
    Set ItemAuthors = Doc.GetFirstItem("Authors")		
    	ItemAuthors.values = "[Admin]"
    	...


    Hiernach darf der Benutzer nichts mehr ändern....


    ????


    codec

    • Offizieller Beitrag

    ... bin mir nicht sicher ob es sich auch so verhällt, wenn Du das Backend-Dokument veränderst.


    Gruß
    Dirk

    Rein logisches Denken verschafft uns keine Erkenntnis über die wirkliche Welt.
    Alle Erkenntnis der Wirklichkeit beginnt mit der Erfahrung und endet mit ihr.
    Alle Aussagen, zu denen man auf rein logischen Wegen kommt, sind, was die Realität angeht, vollkommen leer.
    Albert Einstein

  • Siehe KB-Artikel 1097528 (Site ist gerade down, daher kein Link)

    Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming "Wow, what a ride!!! :evil:
    Beschleunigung ist, wenn die Tränen der Ergriffenheit waagrecht zum Ohr hin abfliessen - Walter Röhrl

  • Zitat

    Siehe KB-Artikel 1097528 (Site ist gerade down, daher kein Link)


    Was steht denn zusammengefaßt in diesem Artikel drin???
    Site ist immer noch down...


    codec

  • [size=large]Problem[/size]
    You write a LotusScript in Lotus Domino® that updates the Authors or Readers fields in a newly created document via the back-end method. For the changes to take effect, you must open the document at the front-end and save it.


    Is it possible to have the changes take effect from the script itself?


    Sample script attached to a button action:

    Code
    Sub Click ()......'--- Create a new document Set doc = db.CreateDocumentdoc.Form = "MyForm"' Fill Author and Reader Fieldsdoc.AuthorField = AuthorListNames  'String containing the list of authors namesdoc.ReaderField = ReaderList  'String containing the list of readers namesCall doc.Save (True, True)'Refresh the view from back-end and front-end to see the newly created documentws.ViewRefreshview.RefreshEnd Sub


    [size=large]Solution[/size]
    If you want to enter multiple names in Authors, Readers, or Names fields, you must use an array. You must also "declare" a NotesItem variable for the desired field using the New NotesItem method and set the SpecialType argument to either READERS or AUTHORS.


    If you are setting only one value, an array is not necessary but you must set the appropriate flag (IsAuthors, IsReaders, IsNames) for the fields' NotesItem object. The example below describes how to set a Readers field to multiple values and an Authors field to a single value.


    NOTE: When using LotusScript to input a name into Names, Authors, or Readers fields, enter the name in full canonical format, for example, as "CN=John Doe/OU=US/O=Widgets". Do not specify the name as "John Doe" or "John Doe/US/Widgets".


    NOTE: The code below is a sample script, provided to illustrate one way to approach this issue. It should be used as is and at your own risk. In order for this example to perform as intended, the script must be laid out exactly as indicated below. Product Support cannot customize this script for specific environments or applications


    Modified script:

    Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming "Wow, what a ride!!! :evil:
    Beschleunigung ist, wenn die Tränen der Ergriffenheit waagrecht zum Ohr hin abfliessen - Walter Röhrl

  • Mmmmh,


    da wird aber nur davon gesprochen, dass das Dokument neu ist. Außerdem wird ein doc.save(true,true) ausgeführt.
    Gilt dann der Umkehrschluß, dass wenn man explizit im Backend ein Save machen muß um die Authorenfelder wirksam werden zu lassen, dass dann ein einfaches Verändern des AuthorItems noch nicht zum Wirksamwerden führen kann und mein Problem irgendwo anders her kommen muß???????


    norbert

  • Ich interpretiere das so, dass die IsAuthors-Property der Knackpunkt ist. Erneut setzen und gut ist...

    Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming "Wow, what a ride!!! :evil:
    Beschleunigung ist, wenn die Tränen der Ergriffenheit waagrecht zum Ohr hin abfliessen - Walter Röhrl

  • RockWilder


    Ich glaube du verstehst nicht so ganz worauf der Fragesteller hinaus will


    codec


    Also bisher konnte ich Dokumente solange im Backend ändern bis ich nach der Änderung von Autorenfeldern das Dokument gespeichert habe. Erst dann ziehen Autorenfelder meines Wissens nach

  • codec


    Ist das doc beim Weitersenden auch noch im Frontend (zum Editieren) geöffnet?
    Wenn es so ist, dann kann der User das im Backend geänderte Dokument nicht mal speichern, kriegt eine nette Meldung, dass ihm die Rechte fehlen...


    Hab' so eine Erfahrung gemacht, die Lösung war: nicht im Weitersenden-Agent, sondern beim Querysave die Rechte verändern / wegnehmen.


    Nur so ein Tipp, vielleicht hilft's...