1) What are the main elements in the component Interface ?
Main elements of component Interface
• Component interface name
• Properties and collections
2) Difference between Get keys, find keys and Create Keys ?
Get keys: – These are mapped to the fields marked as scrh in the component’s search record. Automatically “Search key” fields in search record become Get keys.
We cannot change it.
Find keys: – These are mapped to fields marked as Alt or Srch in the component search record. You may remove Find keys that you do not wish to make available for searching.
Create Keys: – It is generated from the key fields for the search record. If Add search record is present then its key fields are taken. We cannot change it.
3) How do you provide security for the component interface?
• Open the Permission list
• On the Component Interface tab
• Add row and select the newly created Component Interface
• Edit the permissions to give permission for the standard methods
• Get, Create, Save, cancel, find.
4) What the steps that you need to do in people code to invoke Component Interface?
• Establish a user section
• Get the component interface definition
• Populate the create keys
• Create an instance of the component interface
• Populate the required fields
• Save the component Interface.
&Session = GetSession();
&CI = &Session.GetcompIntfc(CompIntfc.INTERFACE_NAME)
&CI.KEY_FILED_NAME = ‘NEW’
If not &CI.Create () Then
Populate other fields
Populate the other fields
If not &CI.Save () Then
5) How do you test Component Interface?
• Using the Component Interface tester
• Give values in the tester for options
• Get Existing, Create new, Find and perform the operation from the CI Tester
6) Catching error message in the component Interface? Or
Use of PSMessages in the CI ?
This function needs to be called when ever methods like Find, Save, Create methods return false.
Error text and Error type can be printed in the log message for any other action in to the log messge.
&PSMessages = &Session.PSMessages;
&ErrorCount = &PSMessages.Count;
For &i = 1 To &ErrorCount
&ErrorText = &PSMessages.Item(&i).Text;
&ErrorType = &PSMessages.Item(&i).Type;
7) What is method? What are the different types of method?
Methods: – A method is an object that performs a very specific function on a component interface at run-time.
Standard methods and user-defined methods.
Standard methods: – Automatically generated upon the creation of a new component Interface in Application.
Apart from the Standard methods there are Standard methods available for the use with any collection.
User-Defined methods: – User-defined methods are those that you can create to meet the requirements of an individual component interface.
8) What are properties?
The Fields in the level 0 in the component are the properties of the component.
Standard properties User-Defined properties
Createkeyinfocollection Developer can further control the exposed Getkeyinfocollection field properties.
Property Info collection
GetHistoryItems (Update/Display mode or Correction mode)
9) Traversing the Collections in the Component Interface?
COLL_JOB – Collection
Coll_JOBItm – Row in the collection.
&COLL_JOBCol = &CI_JOB_DATA.COLL_JOB;
For &i = 1 to &COLL_JOBCol.Count
&COLL_JOBItm = &COLL_JOBCol.Item (&i);
&COLL_JOB_JRCol = &COLL_JOBItm.COLL_JOB_JR;
For &J = 1 to &COLL_JOB_JRCol.Count
&COLL_JOB_JRItm = &COLL_JOB_JRCol.Item (&j);
10) How do you login in correction mode in the Component Interface?
Get History Items and Edit History items property to should be set to true.
Get History Items alone: – Update display all – modes will be used.