Assignable Product or Part (DELMA_AssignableProductValidation_ID)

An opening ID is an entry point used to customize business logic. Assignable Product or Part specifies the opening ID run to determine if a product or part can be assigned to an item.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

The table below provides you with information related to the definition of the opening ID.

PLM Opening ID: DELMA_AssignableProductValidation_ID
Customization intent: Validation
Execution context: Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Part occurrence on which the test is done.
  • Parameters: Corresponds to the context object.
  • Validation

Context Object Parameters

Parameter Name Type Read/Write Comments
Validation Boolean Write TRUE if the part can be assigned and FALSE otherwise.
oForceAssignment Boolean Write TRUE if the user is authorized ti force assignment and FALSE otherwise.

Sample

The 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)