Saturday, 14 May 2016

Update the records in table with validtimestate

        ttsBegin;

          HcmEmploymentEmployee.selectForUpdate(true);
          HcmEmploymentEmployee.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);
          HcmEmploymentEmployee.ProbationEndDate =      DateTimeUtil::addDays
          (employmentStartDate,HcmEmploymentEmployee.ProbationDays-1);
          hcmEmploymentEmployee.update();

        ttsCommit;