Skip to main content

system.kanoa.lot.updateLotStateReasonField

This function is part of the kanoaOPS module

Description

Updates the value of a specified field for a given lot state reason ID. If the field is 'enabled', updates the assetLink Table accordingly.

Syntax

updateLotStateReasonField(lotStateReasonId, field, value, userId)
  • Parameters
      int lotStateReasonId - Lot state reason ID
      string field - Name of the column to be updated
      pyObject value - New value for the specified field
      int userId - User ID
  • Returns
      int - Number of records modified
  • Code Examples

    # Example usage
    lotStateReasonId = 1
    field = 'enabled'
    value = True
    userId = 123
    recordsModified = system.kanoa.lot.updateLotStateReasonField(lotStateReasonId, field, value, userId)
    print(recordsModified) # Print the number of records modified