How to Create weekly timesheet with approved status

When we create the weekly timesheet records individual time track records are created. Hence for creating the Weekly time sheet with an approved status by and particular role deploy scripts in the time track records and create the weekly time sheet records.

    if (currentRole == ROLES.IPFF_DIRECTOR && currentEmployee == ROLES.IPPF_DIRECTOR_EMP) {

          record.submitFields({

            type: ‘timebill’,

            id: currentRecId,

            values: {

              approvalstatus: 3,

            },

            options: {

              enableSourcing: false,

              ignoreMandatoryFields: true

            }

          });

        }

Leave a comment

Your email address will not be published. Required fields are marked *