Skip to main content

system.mes.unitOfMeasure.doesConversionExist

Description

Checks if a Unit Of Measure Conversions object with the given parameters exists.

Permissions

This method requires the UNIT_OF_MEASURE.READ.GET permission.

Syntax

system.mes.unitOfMeasure.doesConversionExist(fromIdOrName, toIdOrName, materialId)

Parameters

ParameterTypeNullableDescription
fromIdOrNameStringFalseThe ULID or name of the from unit of measure to check.
toIdOrNameStringFalseThe ULID or name of the to unit of measure to check.
materialIdString (ULID)TrueThe ULID of the material associated with the conversion.

Returns

Returns a boolean indicating whether the unit of measure conversion exists.

Code Examples

# Check whether the unit of measure conversion exists
uomcExists = system.mes.unitOfMeasure.doesConversionExist('Pound', 'Kilogram', '01JCH3TP3Y-4B080WHN-MSR8RVP5')

# Output the boolean result
print(uomcExists)