Version:
  1. Script for finding out current user

    Article: AN0001906 Updated: 03.10.2018 Displayed: 637x

    Reading current user

    Below script returns instance of Person object for current user.
    var p = OG.Person.GetLoginPerson();
    In order to save the user in the record (DataRow) it is necessary to convert it to type PersonInfo.
    dr['user'] = OG.Person.GetLoginPerson().ToPersonInfo();


    Reading extended user properties

    In case you have configured class for extending user properties, you can read its data for particular user. The below example shows how to read data from column manager that is created in the class.

    var p = dr['solver'];
    var manager = null;
    if ( p != null)
    {
      var pDr = OG.DataRow.GetPersonDataRow(p.Id);
      if ( pDr != null)
      {
        manager = pDr['manager'];
      }
    }

  2.    ---
    Your rating:
    Rated by users: 0x
  3. Top
SearchTitle
×