PlanConstraint::findOrCreate Method
Finds or creates the PlanConstraint and PlanSequenceConstraintValue records.
Syntax
client server public static PlanConstraint findOrCreate(
ConstraintType _constraintType,
SequenceType _sequenceType,
[ConstraintRoleType _constraintRoleType,
ConstraintValue _constraintValue,
RefRecId _unitOfMeasure])
Run On
Called
Parameters
- _constraintType
Type: ConstraintType Extended Data Type
The type of constraint.
- _sequenceType
Type: SequenceType Extended Data Type
The type sequence constraint type.
- _constraintRoleType
Type: ConstraintRoleType Extended Data Type
The constraint value role.
- _constraintValue
Type: ConstraintValue Extended Data Type
The constraint value.
- _unitOfMeasure
Type: RefRecId Extended Data Type
The constraint value unit of measure.
Return Value
Type: PlanConstraint Table
A PlanConstraint record if it exists or was created; otherwise, an empty buffer.
Remarks
When the _constraintValue and _unitOfMeasure parameters are both set to 0, this method will not create a constraint value.