Setting Component Interface Keys
The keys for a Component Interface are based on the key fields of the underlying component. There can be different types of keys for a Component Interface.
-
CREATEKEYS: A list of the primary key fields of the search record specified to be used in Add mode for the component. This list is automatically generated.
-
GETKEYS: A list of the primary (required) key fields on the search record. This list is automatically generated.
-
FINDKEYS: A list of primary and alternate key fields on the primary search record for the component.
If the Component Interface has CREATEKEYS, these are the keys you must set before you execute the Create() method to create a new instance of the data. If the Component Interface doesn’t have CREATEKEYS, use the GETKEYS to specify a new instance of the data.
Use either the GETKEYS or FINDKEYS to specify an existing instance of the data.
To set key values, use the field names listed under GETKEYS, CREATEKEYS or FINDKEYS like properties on the Component Interface object. The following example sets the CREATEKEYS values to create a new instance of the data.
&MYCI = GetCompIntfc(CompIntfc.EXPRESS_ISSUE);
&MYCI.BUSINESS_UNIT = "H01B";
&MYCI.INTERNAL_FLG = "Y";
&MYCI.ORDER_NO = "NEXT’;
&MYCI.Create();