ValidateCompIntfc method: Session class
Syntax
ValidateCompIntfc(ComponentInterfaceName)
Description
The ValidateCompIntfc method, used with the Session object, returns an integer value indicating whether the validation is successful. The validation fails if no component interface exists with the given name. The primary purpose of this method is to validate the successful compilation of all PeopleCode programs associated with both the component and the component interface. In addition, this method verifies other relationships of the component interface to the component, such as, but not limited to checking whether the component interface:
-
Contains a reference to an invalid component.
-
Is defined with CREATEKEYS, but the component does not allow the add action.
-
Is defined with CREATEKEYS, but the specified field is not a search key.
-
Has a reference to an invalid field.
-
Has a reference to an invalid record.
-
Is defined with FINDKEYS, but the specified field is not a search key or an alternate search key.
-
Is defined with GETKEYS, but the specified field is not a search key.
-
Has references to a search or add record that is invalid.
Parameters
| Parameter | Description |
|---|---|
|
ComponentInterfaceName |
Specify the component interface name as a string. |
Returns
An integer value indicating whether the validation is successful: 0 indicates success; any non-zero value indicates failure.
Example
In the following example, a component interface with name "DEMOAPP_CI" is validated.
Local ApiObject &MYSESSION;
Local integer &nRet;
&MYSESSION = %Session;
&nRet = &MYSESSION.ValidateCompIntfc("DEMOAPP_CI");
If &nRet <> 0 Then
/* Failure Case */
Else
/* Success Case */
End-If;