2 Replies Latest reply on Apr 30, 2013 4:35 AM by 827912

    custom button on a CC&B page


      I have created a custom button on a Premise page. On clicking that button a record should be inserted into a custom table. How to accomplish this ?

      1) is it possible to invoke a change handler on clicking a custom button ?
      2) is it possible to call a service from custom button user exit jsp program to create entries in custom table ? I have used doPageRead to read information but i don't know how to insert records by using a service. Any examples?

      Please suggest some options with examples. I am new to this type of coding.. Thanks a lot in advance
        • 1. Re: custom button on a CC&B page
          Any suggestions on this please ?
          • 2. Re: custom button on a CC&B page
            Yes it is possible to create a new button ,I assume you are using Framework version 2 or lower than 4 ,if yes then approach is different .
            ==>if you want a record to be inserted in new table ,First create a table ,Complete all the basic necessary steps like column creations ,constraints etc., and then create an entity over it using SDK
            ==>Now to use this entity you can either create a PageService if you want a transaction to happen which is completely independent on the Premise service or if you want hit the MO service which in your case is premise then extend the MO service or write a change handler

            ==>Change Handler is itself a type of UserExit.

            ==>If you are in a situation where you find difficult to edit COBOL code then go for interceptors but i suggest ChangeHandler

            ==>Now comes real challenge to attach the button,All UI's in CCB are framework predefined and are uneditable unless you have Workbench Tool which is deprecated now i think.
            Refer SDK Documentaion Cookbook for more help on how to add new button using workbench

            ==>I suggest not to change base package UI's because whenever you run initialsetup or redeploy your framework code the Application gets replaced with initial version which inturn deletes your modifications unless you follow some rules to implement your custom code .

            So answer is use Zones or portal and create new pages,in that page call your already created Page service via Business Service ,In this way you can insert record into your custom table.

            1 person found this helpful