You are on page 1of 2

When should I be using a component interface?

If you need to insert/update/delete data through PeopleCode, and your PeopleCode will require replicating a lot of existing business logic that already exists i n a component then a component interface is the best approach. Once you learn ho w to use them, they will be the fastest and most robust solution for such cases. If you are performing simple changes, then using a CI becomes overkill as there is an overhead to using a CI on both the system and on development time. Similar ly, large amounts of batch processing may be too much for a CI to handle or may be considerably slower using a CI. When I create my component interface, why can't I see any Getkeys? The search record for your component does not have any search keys defined. Go b ack and define search keys as these are used as Getkeys. Why are my Findkeys missing certain fields? Findkeys are derived from search and alternate search keys on the component sear ch record. If you have a key but it is neither a search key or alternate search key, then it will not be available as a Findkey. When I test my component interface, why do I get a "Not Authorized" error? Check that your component interface is included in a permission list that you ha ve access to. Also check that you have access to all possible methods (Get, Save , Create, Cancel, Find). If you delete a component interface through application designer, it is also removed from any associated permission lists so this may b e another reason why your new component interface (with the same name) is not au thorized any more. Also, make sure you are not trying to do something in your code that the CI can' t do. For example, if your CI doesn't have a create method, you can't set securi ty for it, so you will get a not authorized error if you have code that attempts to perform a create. This is because the authorization error is usually the fir st error to be displayed. When automatically building a component interface, why are some fields missing? Sometimes application designer gets it wrong. For instance, if the same field ex ists in scroll 1 and scroll 2, it may put the field in just one scroll level. It may also have problems with certain key/search key/alternate search key fields between the search record and the scroll level records. Normally you just need t o check your CI and add any missing fields. Why does my component interface not have a Create method? Create is only available if the underlying component allows Add mode. If it does n't then you can't create anything in the component, and thus you can't create a nything using the component interface. The create method will be disabled in the component interface properties. Can I override my Component Interface methods? Yes, you can write additional PeopleCode for your component interface methods. S imply go to the method (Cancel, Find, Get, Save, Create), right-click and select view PeopleCode. My PeopleCode didn't copy any data to a collection. Why not? Make sure that all the fields that you are copying to in a collection actually e xist in the component interface! If any are missing you can get unexpected resul ts or none at all. My PeopleCode didn't update the value of a field. Why not? Check that the field is actually in your component interface. Also make sure tha t the field properties are not set to Read Only Access. (double click on the fie

ld in the component interface). The same field is in different scrolls but they do not have the same value For example, at scroll 0 you might have the field EFFDT set to 01/01/2009. You w ant the EFFDT field to get the same value in scroll 1, so you write code to set it from the value in level 0 but it isn't working. If this is the case, check th e field name in the component interface, you may find that PeopleSoft has automa tically renamed it. For example, it might be EFFDT at level 0 but something like EFFDT_1 in level 1 of the component interface. What underlying tables define security access to Component Interfaces? The association between a permission list (CLASSID) and a component interface (B CNAME) is stored in the PeopleTools table PSAUTHBUSCOMP. What delivered role / permission gives access to all the delivered CIs? The role is Standard Non-Page Permissions. The permission list is HCSPCMPINT. I get the error No Rows Exist for Specified Keys But I have double checked that the key values being passed are correct and exist in the database. What's going on? This could be row level security at work. Don 't forget that a CI uses the security implemented by the underlying component. A re you sure that the user running the CI has the appropriate row level security to view the data? Confirm by querying against the search record of the underlyin g component. Row level security may also be at work if you are getting errors en tering valid values into a field where the prompt table relies on row level secu rity.

You might also like