Skip to main content

system.kanoa.schedule.updateScheduleBlock

Description

Updates a schedule block.

Syntax

updateScheduleBlock(scheduleBlockInfo, userId)

Parameters:
  • scheduleBlockInfo (dictionary): Dictionary containing information about the schedule block.
  • userId (int): User ID.

  • Returns:
  • modifiedRecords (int): Number of records modified.
  • Dictionary

    ParameterTypeRequiredNotes
    scheduleBlockIdintYesId of the schedule block
    scheduleBlockNamestringYesName of the schedule block
    assetIdintYesID of the asset associated with the schedule block
    itemIdintNoID of the item associated with the schedule block or None
    workOrderIdintNoID of the work order associated with the schedule block or None
    scheduledQtyintYesQuantity scheduled
    modeIdintYesID of the mode associated with the schedule block
    startDatedatetimeYesStart date of the schedule block
    endDatedatetimeYesEnd date of the schedule block
    notesstringNoAdditional notes for the schedule block
    rruleStrstringNoRecurrence rule string (e.g., 'FREQ=DAILY;INTERVAL=1')
    colorstringNoColor code for the schedule block

    Code Examples

    # Example Usage:
    updated_schedule_info = {'scheduleBlockId': 456, 'scheduleBlockName': 'Updated Maintenance', 'assetId': 2, 'itemId': None, 'workOrderId': None, 'scheduledQty': None, 'modeId': 4, 'startDate': ..., 'endDate': ..., 'notes': 'Updated Maintenance notes', 'rruleStr': '...', 'color': '00FF00'}
    user_id = 123
    records_modified = system.kanoa.schedule.updateScheduleBlock(updated_schedule_info, user_id)