Suggested Alternate Parts (DELPPRSearchAlternateReference_ID)

An opening ID is an entry point used to customize business logic. Suggested Alternate Parts specifies the opening ID run to get the suggested alternate parts of an item occurrence.

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 IDDELPPRSearchAlternateReference_ID
Customization intent Execution
Execution contextClient

Input Objects

Input objects must be of the following types:

  • ThisObject: Occurrence of the item.
  • Parameters: Corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead/WriteComments
RequestCustomizedSearchBoolean ReadShould the BL return results or just the value of OutputIsMenuCustomizedSearchVisible.
OutputListSearchObjectRefListWrite Gives the list of the reference objects to be proposed for the alternate panel.
OutputIsMenuCustomizedSearchVisibleBooleanWrite To know if the customized menu will be visible.

Sample

The following sample determines how to get the suggested alternate parts of the item occurrence.

/* ---- input ---- */
Let ProcessOcc(MfgProcessOccurrence) 		/* Input Process Occurrence*/
Let RequestCustomizedSearch(Boolean) 		/* RequestButtonVisibleState flag */

/* ---- output ---- */
Let ListSearchObjectRef(List)
Let VisibleMenuCustomizedSearch(Boolean)

/*--- variable for code Example --- */
 let SPE_REF(PLMCoreReference)  
 let SPE_REF_PART(Part)  
 let ListOfAlternateRS(list)  
 let NbAltRS(Integer)  
 let idx(Integer)  
 let CurAlt(Alternate)  
 let SPE_REF_ALT(PLMCoreReference) 
 let Processes (List)  
 let LeProcess(DELFmiFunctionReference) 

set VisibleMenuCustomizedSearch = false
set ProcessOcc = ThisObject

/* ---- RETRIEVE INPUT PARAMETERS ---- */
if (true == Parameters.HasAttribute("RequestCustomizedSearch")) 
{
	set RequestCustomizedSearch = Parameters.GetAttributeBoolean("RequestCustomizedSearch")
}

/* ---- CODE ---- */
if (RequestCustomizedSearch == true)
{
	 SPE_REF=ProcessOcc.ProductScope
	 set SPE_REF_PART=SPE_REF 

	 ListOfAlternateRS=SPE_REF_PART.ListAlternateParts() 
	 NbAltRS=ListOfAlternateRS.Size() 

	 set idx =1 
	 for idx while idx<=NbAltRS 
	 { 
	  CurAlt = ListOfAlternateRS.GetItem(idx) 
	 	SPE_REF_ALT=CurAlt.Children.GetItem(1) 
	 
	 	Processes.RemoveAll() 
	 	Processes = GetProcessOfEachScope(SPE_REF_ALT) 
	 	LeProcess=Processes.GetItem(1) 
	 	ListSearchObjectRef.Append(LeProcess) 
	 } 
}

 set VisibleMenuCustomizedSearch = true 

/* ---- FILL OUTPUT PARAMETERS ---- */
if (true == Parameters.HasAttribute("OutputIsMenuCustomizedSearchVisible")) 
{
	Parameters.SetAttributeBoolean("OutputIsMenuCustomizedSearchVisible", VisibleMenuCustomizedSearch)
}

if (true == Parameters.HasAttribute("OutputListSearchObjectRef")) 
{
	Parameters.SetAttributeObject("OutputListSearchObjectRef", ListSearchObjectRef)
}