General InformationThe table below provides you with information related to the definition of the opening ID.
This opening ID is used in the following contexts:
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following sample determines if a product or a part can be assigned to an item.
Let iPart(ProductOccurrence)
Let AttValue(String)
Let PartInstance(VPMInstance)
Let PartName(String)
Let PartTest(String)
Let ReturnMessage(String)
Validation = true
ReturnMessage =""
/* If the 3 first characters of the name is Not, the part is not assignable else it is */
set iPart = ThisObject
if ( NULL <> iPart)
{
PartInstance = iPart.Instance
if (PartInstance <> NULL)
{
PartName = PartInstance->GetAttributeString("PLM_ExternalID")
PartTest=PartName.Extract(0,3)
if (PartTest <> "Not")
{
Validation = false
ReturnMessage = "The business logic does not allow assignation of "+PartName
Parameters.SetAttributeBoolean ("oForceAssignment", false)
}
}
}
Parameters.SetAttributeString("Message",ReturnMessage)
| |||||||||||||||||||||||||