1. Adding user to column

    Artikel: AN0002460Aktualisiert: 09.05.2021
    Die vorgegebene Sprachenversion vom Artikeltext wird angezeigt, weil es kein Text von der ausgewählten Sprache und Version gibt.

    Following script will add user to a record column.

    Example:

    When creating a Project record we want to set actual user as a project manager, unless this field was already filled in, and we want to add this user also to the project team. Column ict-project-manager is a simple reference to a user. Column project_team is a multiple reference to users. This is why both are using a different syntax.

    We will create a rule Before new record save (type Script) in the class Project.

    var pi = OG.Person.GetLoginPerson().ToPersonInfo();

    if (OGActualDataRow['ict-project-manager'] == null)
    {
    OGActualDataRow['ict-project-manager'] = pi;
    }

    var pil = OGActualDataRow['project_team'];
    pil.Add(pi);

×