system.kanoa.schedule.updateScheduleBlock
Description
Updates a schedule block.Syntax
updateScheduleBlock(scheduleBlockInfo, userId)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
scheduleBlockId | int | Yes | Id of the schedule block |
scheduleBlockName | string | Yes | Name of the schedule block |
assetId | int | Yes | ID of the asset associated with the schedule block |
itemId | int | No | ID of the item associated with the schedule block or None |
workOrderId | int | No | ID of the work order associated with the schedule block or None |
scheduledQty | int | Yes | Quantity scheduled |
modeId | int | Yes | ID of the mode associated with the schedule block |
startDate | datetime | Yes | Start date of the schedule block |
endDate | datetime | Yes | End date of the schedule block |
notes | string | No | Additional notes for the schedule block |
rruleStr | string | No | Recurrence rule string (e.g., 'FREQ=DAILY;INTERVAL=1') |
color | string | No | Color 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)