Invoke Event Recievers on button click

Hi all,
I Have an Event Reciever which updated a column of the list whose name is specified,
I have an Webpart with ListName(Txt Box) and a Button Control,
On click of which the Event Reciever that I have created should be invoked on the ListName Given in the Txt Box.
How can I do this, plz help
Thanks in advance

Hi,
Now If i am correct then you just want to activate an EventReciever on click of button on a Page using Object Model code and you have your Event Reciever already deployed and register in Global Assembly Cache.
To do this just add this code on the button click event on page.
using (SPSite site = new SPSite(SPContext.Current.Web.Url))
using (web = site.OpenWeb())
SPList list = web.Lists["ListName"];
if (list != null)
string className = "YourClassNameSpace.YourClass";
string asmName = "NameOftheAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken={PublicKeyToken}";
web.AllowUnsafeUpdates = true;
//add the added/updated/deleted events to the list.
list.EventReceivers.Add(SPEventReceiverType.ItemAdded, asmName, className);
list.EventReceivers.Add(SPEventReceiverType.ItemUpdated, asmName, className);
list.EventReceivers.Add(SPEventReceiverType.ItemDeleted, asmName, className);
list.Update();
Mark as Answer if helped!! To be or Not to Be..The question is this only......

Similar Messages

  • I'm not able to get to the OnInputProcessing event from a button click

    I have a tableview and I added a button and I have put the code in the event OnInputProcessing. But when I click the button, it does not get to the event. Do you know what the problem might be?
    Please help
    Here's the complete code:
    ==============================
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <%@extension name = "bsp" prefix="bsp" %>
    <% if mrept = 'X'.%>
    <htmlb:content design="classicdesign2002design2003" >
      <htmlb:page title = "Manager's Report ">
      <htmlb:form>
          <%-- TableView with columns description table --%>
          <htmlb:tableView id              = "tvX"
                           headerText      = "Manager's Report"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "30"
                           fillUpEmptyRows = "true"
                           onHeaderClick   = "MyEventHeaderClick"
                           onRowSelection  = "MyEventRowSelection"
                           keyColumn       = "contract"
                           table           = "<%= ZVMGR_MREPT %>"
                           iterator        = "<%= tv_iterator %>" >
          <htmlb:tableViewColumns>
              <htmlb:tableViewColumn    columnName       = "manager"
                                        wrapping         = "true"
                                        title            = "Manager" />
              <htmlb:tableViewColumn    columnName       = "sales_rep"
                                        wrapping         = "true"
                                        title            = "Sales Rep" />
              <htmlb:tableViewColumn    columnName       = "kunnr"
                                        wrapping         = "true"
                                        title            = "Sold To" />
              <htmlb:tableViewColumn    columnName       = "zzmassn"
                                        wrapping         = "true"
                                        title            = "Action" />
              <htmlb:tableViewColumn    columnName       = "action_date"
                                        wrapping         = "true"
                                        title            = "Compliance Review Date" />
              <htmlb:tableViewColumn    columnName       = "vtext"
                                        wrapping         = "true"
                                        title            = "Prod Line" />
              <htmlb:tableViewColumn    columnName       = "name1"
                                        wrapping         = "true"
                                        title            = "Name" />
              <htmlb:tableViewColumn    columnName       = "ort01"
                                        wrapping         = "true"
                                        title            = "City" />
              <htmlb:tableViewColumn    columnName       = "regio"
                                        wrapping         = "true"
                                        title            = "State" />
              <htmlb:tableViewColumn    columnName       = "period"
                                        wrapping         = "true"
                                        title            = "Compliance Review Period" />
              <htmlb:tableViewColumn    columnName       = "c_or_nc"
                                        wrapping         = "true"
                                        title            = "Status" />
              <htmlb:tableViewColumn    columnName       = "shortfall"
                                        wrapping         = "true"
                                        title            = "Shortfall Total" />
              <htmlb:tableViewColumn    columnName       = "close_date"
                                        wrapping         = "true"
                                        title            = "Action Date" />
              <htmlb:tableViewColumn    columnName       = "rewrt"
                                        wrapping         = "true"
                                        title            = "Action $" />
              <htmlb:tableViewColumn    columnName       = "zrvtid"
                                        wrapping         = "true"
                                        title            = "Contract" />
             </htmlb:tableViewColumns>
             </htmlb:tableView>
               <htmlb:button id = "btnxl" design = "emphasized" text = "Excel"
                onClientClick = "OnInputProcessing()" tooltip = "Download to Excel" />
           <p>
        <input type=submit name="onInputProcessing(Submit)"  value="Excel">
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <%else.%>
    <htmlb:content design="classicdesign2002design2003" >
      <htmlb:page title = "Sales Rep's Report ">
        <htmlb:form>
          <%-- TableView with columns description table --%>
          <htmlb:tableView id              = "tvX"
                           headerText      = "Sales Rep's Report"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "30"
                           fillUpEmptyRows = "true"
                           onHeaderClick   = "MyEventHeaderClick"
                           onRowSelection  = "MyEventRowSelection"
                           keyColumn       = "contract"
                           table           = "<%= ZVMGR_SREPT %>"
                           iterator        = "<%= tv_iterator %>" >
          <htmlb:tableViewColumns>
              <htmlb:tableViewColumn    columnName       = "sales_rep"
                                        wrapping         = "true"
                                        title            = "Sales Rep" />
              <htmlb:tableViewColumn    columnName       = "kunnr"
                                        wrapping         = "true"
                                        title            = "Sold To" />
              <htmlb:tableViewColumn    columnName       = "zzmassn"
                                        wrapping         = "true"
                                        title            = "Action" />
              <htmlb:tableViewColumn    columnName       = "action_date"
                                        wrapping         = "true"
                                        title            = "Compliance Review Date" />
              <htmlb:tableViewColumn    columnName       = "vtext"
                                        wrapping         = "true"
                                        title            = "Prod Line" />
              <htmlb:tableViewColumn    columnName       = "name1"
                                        wrapping         = "true"
                                        title            = "Name" />
              <htmlb:tableViewColumn    columnName       = "ort01"
                                        wrapping         = "true"
                                        title            = "City" />
              <htmlb:tableViewColumn    columnName       = "regio"
                                        wrapping         = "true"
                                        title            = "State" />
              <htmlb:tableViewColumn    columnName       = "period"
                                        wrapping         = "true"
                                        title            = "Compliance Review Period" />
              <htmlb:tableViewColumn    columnName       = "c_or_nc"
                                        wrapping         = "true"
                                        title            = "Status" />
              <htmlb:tableViewColumn    columnName       = "shortfall"
                                        wrapping         = "true"
                                        title            = "Shortfall Total" />
              <htmlb:tableViewColumn    columnName       = "close_date"
                                        wrapping         = "true"
                                        title            = "Action Date" />
              <htmlb:tableViewColumn    columnName       = "rewrt"
                                        wrapping         = "true"
                                        title            = "Action $" />
              <htmlb:tableViewColumn    columnName       = "zrvtid"
                                        wrapping         = "true"
                                        title            = "Contract" />
             </htmlb:tableViewColumns>
             </htmlb:tableView>
               <htmlb:button id = "btnxl" design = "emphasized" text = "Excel"
                onClientClick = "OnInputProcessing()" tooltip = "Download to Excel" />
           <p>
        <input type=submit name="onInputProcessing(Submit)"  value="Excel">
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <%endif.%>

    Hey Samuel,
    You have not defined the name of the event.
    Your button tag should be defined as follows:
    <b><htmlb:button id = "btn_ShowProductStructure"
    text = "Show Product Structure"
    design = "EMPHASIZED"
    onClick = "onInputProcessing(<i>btn_ShowProductStructure</i>)"
    tooltip = "Click here to open Product Structure.."
    /></b>
    In attribute: onClick = "onInputProcessing(btn_ShowProductStructure)" replace <b><i>btn_ShowProductStructure</i></b> by the name of the event that you want to define.
    Then onInputProcessing Page write the following code:
    <b>IF EVENT->NAME = 'button' AND EVENT->EVENT_TYPE ='click'.
       CASE EVENT->ID.
         WHEN <i>'btn_ShowProductStructure'</i>.
    <your logic comes here>
    ENDCASE.</b>
    Regards,
    Reema.
    Pl. give points if this solution addresses your problem.

  • 2 Events on single button click in JSP.

    Hello!
    I want your help in the following topic.
    I want to load 1 html-report page as well as i want to open 1 window on the single(same) button click, on the JSP page & as soon as the html-report page gets loaded , the window should get closed.
    I don't know how to do this. If anyone knows please help me in this.
    Thank You.

    I don't see why you want to open a second page, then close the first one.
    However each page must be generated by a separate request from the browser to the server so the essential stuff all has to be done on the client side with JavaScript. JSPs are nothing to do with it. JSPs are intended to do one thing - generate HTML and the JSP has done it's job before the page arrives on your browser.
    To open a popup window your Javascript used Window.open(url, windowName).
    What you'll get with be a pop-up window, so check your browser settings (which may block pop-up windows). This might be a reason to re-think your design.

  • Result handler not getting invoked on button click - URGENT

    Hi Folks,
    We are working on a form submit application where we populate the form and finally click on button to submit the completed form. We are using BlazeDs On button click I call java service and expect a response object back to flex UI. We are getting the java call invoked successfully and the log clearly shows that the appropriate objects are returned from java service, however, the result handler is not getting inviked to capture the result in flex mxml. I am in urgent need of your help on this
    Code snippet:
    <mx:Script>
    <![CDATA[
    protected  
    function Service_resultHandler(event:ResultEvent):void
    Alert.show(
    "event.result.troubleTicketId ::"+event.result.status); 
    var u:URLRequest = new URLRequest("http://www.adobe.com/flex");navigateToURL(u,
    "_blank"); 
    private function faultHandler_exitService(event:FaultEvent):void {Alert.show(event.fault.faultString +
    '\n' + event.fault.faultDetail); 
    var u:URLRequest = new URLRequest("http://www.google.com");navigateToURL(u,
    "_blank"); 
    protected  
    function submit_clickHandler():void
    //Alert.show("1");
    createTicketForm.setCallDetails_callRegion(FlexUI_callDetails_callRegion);
    //Alert.show("2"+FlexUI_callDetails_callRegion);
    createTicketForm.setCallDetails_callRegion2(FlexUI_callDetails_callRegion2);
    exitService.createTroubleTicket(createTicketForm);
    ]]>
     </mx:Script>  
    <mx:RemoteObject id="exitService" destination="ExitService" fault="faultHandler_exitService(event)">
    <mx:method name="createTroubleTicket" result="Service_resultHandler(event)"/>
    </mx:RemoteObject>
    <mx:Button 
    label="submit Ticket" width="65" height="22" textAlign="right" x="904" y="-10" click="submit_clickHandler()" />
    My Java service:
    public  
    class ExitService {  
    public CreateTmsTicketResponse createTroubleTicket(CreateTicketForm createTicketForm){
    return  
    createTmsTicketResponse;}
    remoting-config.xml:
     <destination id="ExitService">  
    <properties>  
    <source>com.qwest.qportal.flex.createTicket.ExitService</source>  
    </properties>
     </destination>

    Please refer to below link, hope it helps:
    http://forums.asp.net/t/1927214.aspx?The+IListSource+does+not+contain+any+data+sources+
    Please ensure that you mark a question as Answered once you receive a satisfactory response.

  • Invoking another form from a button click..

    Hi,...
    I am a beginner in Java Swing Programming using the Netbeans IDE.I want to invoke a form from an existing form thru a button click; thnx...
    Code:
    1st form : NewJFrame.java
    public class NewJFrame extends javax.swing.JFrame {
    /** Creates new form NewJFrame */
    public NewJFrame() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jButton1 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jButton1.setText("jButton1");
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(151, 151, 151)
    .addComponent(jButton1)
    .addContainerGap(176, Short.MAX_VALUE))
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(130, 130, 130)
    .addComponent(jButton1)
    .addContainerGap(147, Short.MAX_VALUE))
    pack();
    }// </editor-fold>
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    // End of variables declaration
    2nd Form:
    public class NewJFrame1 extends javax.swing.JFrame {
    /** Creates new form NewJFrame1 */
    public NewJFrame1() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 400, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 300, Short.MAX_VALUE)
    pack();
    }// </editor-fold>
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame1().setVisible(true);
    }

    shelton141 wrote:
    using the Netbeans IDE.I want to invoke a form from an existing form thru a button clickNote that, instead of JFrame, we normally use JDialog (either a modal or a non modal) for secondary windows.
    We can add an actionPerformed event to the jButton1 in design mode, or manually like this:
    public NewJFrame() {
        initComponents();
        jButton1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                new NewJFrame1().setVisible(true);
    }

  • How to call elem. Search help on Button click event in WD appilcation

    Hello All,
    i have requirement to call elem. search help on button click event in WD application. currently i am calling FM  F4IF_START_VALUE_REQUEST but getting the short dump as below,
    The following error text was processed in the system X31 : Screen output without connection to user.
    The error occurred on the application server saps_X31_31 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    SYSTEM-EXIT of program SAPLSDH4
    Function: F4_PRESEL_WITH_TABSTRIP of program SAPLSDH4
    Form: F4PROZ_STEP_PRESEL of program SAPLSDSD
    Function: DD_SHLP_SINGLE_STEP of program SAPLSDSD
    Form: F4PROZ_LOOP of program SAPLSDSD
    Form: F4PROZ of program SAPLSDSD
    Function: F4IF_START_VALUE_REQUEST of program SAPLSDHI
    Method: ONACTIONSEARCH_CUSTOMER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    is there any way to achieve the required behaviour.
    please let me know.
    Regards,
    Chandra

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • How to invoke a task flow on click of a button(CommandToolbarButton)

    hi All,
    I'm using JDev11g, ADF BC.
    Case Background: I'm designing a screen which has a summary and detail screen in same page. I'm displaying a table from which the user would select a row and click on a button to invoke an action through the Task Flow. In the Task flow i have two fragments one to view the record and other to edit the record. The form to view is read-only and the other is editable.
    Problem: I'm not able to invoke the task flow from click of the button, it just refreshes the page.
    I would like to know how to fix this issue.
    -Jyothi

    Hi,
    can i include page-fragments(.jsff) in the task-flow which is invoked by the select button in the page(.jspx). I would like to know if that could be a reason for the error.
    -Jyothi

  • How do you fire a button click event on apex page from fancybox iframe that was created by page

    I am trying to fire off the button click event from fancybox iframe. The apex page has a button that launches a fancybox iframe which is loaded with an APEX form. On close of that fancy box, I am trying to fire a click event on the parent page which will refresh a div with html that is created with plsql. The button on the page works as expected when clicked from the page. It will show a debug alert message to prove it was called and then load the div with the correct data. I am unable to fire off this button click from the fancybox iframe when it closes.
    A couple of points:
    I using Plug-in: Execute PL/SQL Code and Return Content ("PLUGIN_MULEDEV.SERVER_REGION_REFRESH") to place the create fancybox statement. It is used to populate a div using plsql.
    The name of the button on the main page is P2020_REFRESH_SECTION_BUILDER_BTN.
    The click dynamic action on the button is calling the plugin to replace the html in the div.
    The data in the form in the fancybox is being saved to the database. On close of the fancybox box I want to refresh the div so the new record is included in the div html.
    Can anyone help. Here is the fancybox code:
      function customProcessOnReadyState4(){
        for (var i=0;i<11;i++){
          $( "#tabs"+i ).tabs();
          $("#createNewExerciseLink"+i).fancybox({
              ''width''         : ''60%'',
              ''height''        : ''70%'',
              ''autoScale''     : true,
              ''transitionIn''  : 200,
              ''transitionOut'' : 200,
              ''type''          : ''iframe'',
              ''onClosed''         : function() {
                                         window.parent.$(''#P2020_REFRESH_SECTION_BUILDER_BTN'').click();
    Here are the dynamic actions assigned to the button:
    5 - Execute JavaScript Code
    alert("Starting refresh");
    10 - Execute PL/SQL Code and Return Content [Plug-in]
    begin
      SCTUI.create_sct_tabs2(:P2020_CREATE_SECTION_LOV, '1');
    end;

    user setActionListener...
    <af:setActionListener from="#{bindings.XXX.inputValue" to="#{backingbean.variable}"
                  <af:inputText value="#{bindings.Email.inputValue}"
                                label="#{bindings.Email.hints.label}"
                                binding="#{backingBeanScope.backing_ShuttlePage.it2}"
                                id="it2">
                    <f:validator binding="#{bindings.Email.validator}"/>
                  </af:inputText>
                  <af:commandButton text="commandButton 2"
                                    binding="#{backingBeanScope.backing_ShuttlePage.cb2}"
                                    id="cb2" action="passing">
                    <af:setActionListener from="#{bindings.Email.inputValue}"
                                          to="#{processScope.detail}"/>
                  </af:commandButton>next jsf page:
                <af:outputText value="#{processScope.detail}"
                               binding="#{backingBeanScope.backing_ProcessScope.ot1}"
                               id="ot1"/>setPropertyListener also should work
    <af:setPropertyListener from="#{bindings.Email.inputValue}" to="#{processScope.detail}" type="action"/>

  • How to generate barcode on button click event in PDF using adobe livecycle?

    I already created form in PDF file which is validate completely .But , I required generate a barcode of all field of form using custom script on button click event.
    Please give me right way for doing it .
    Thanks in Advance,
    Jaydeep Solanki.

    Hi vijay,
    What project are you doing? Is it Asp.Net project? If so, you'll need to post it in the dedicated ASP.Net Forum
    http://forums.asp.net  for more efficient responses, where you can contact ASP.NET experts.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to open a text file using button click event

    hi, How can i open a text file in a textpad or notepad on the click event of a button.?
    Thanks
    Jay

    Pnt,
    this will not work LV 8.0.1 and LV 8.6 will give back error 193.
    Attached is a VI to use the ShellExecute WinAPI. The VI is LV 7.1.1.
    Message Edited by waldemar.hersacher on 10-09-2008 10:48 PM
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions
    Attachments:
    ShellExecute.zip ‏27 KB

  • Sharepoint 2010 Custom Visual Webpart button click event firing on page refresh

    I have developed a Visual Webpart to create a list in SP using vs2010 and  the button click event I have written the list create method. If I click the button list is created successfully.  And I refresh the page again list is creating(Again button
    click event is triggering).please help me to solve the issue.
     protected void Button1_Click(object sender,
    EventArgs e)
                SPWeb web
    = SPContext.Current.Web;
                //SPList list=web.Lists["Auto"];
                SPList list
    = web.Lists[DropDownList2.SelectedItem.Text];
                if
    (string.IsNullOrEmpty(TextBox1.Text)
    || string.IsNullOrEmpty(DropDownList1.Text))
    Label4.Text =
    "Fields Are Empty";
                else
    if (DropDownList1.SelectedItem.Text
    == "Single line of Text")
                    list.Fields.Add(TextBox1.Text,
    SPFieldType.Text,
    true);
    SPView viewname = list.Views["All Items"];
                    viewname.ViewFields.Add(TextBox1.Text);
    //viewname.Update();
                    list.Update();
    Label4.Text =
    "Field Created Successfully";
    TextBox1.Text =
    string.Empty;
    // Label4.Text = string.Empty;

    Hi,
    This is because the request is sent to the server when you refresh the page.
    A workaround for this is that we can “provide a refresh link that redirects to the same page (or if you have some action causing the refresh programmatically, you could just
    redirect to the page after that, with Response.Redirect)
    so that page is requested by the browser (with GET method, default with hyperlinks)”.
    More information:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/45648b39-1229-405c-ac9e-60eb82905982/click-event-getting-fired-on-page-refresh
    Or we can use the Session to save a value which used as a flag for us to check whether it is a page refresh and perform accordingly.
    http://www.codeproject.com/Articles/28099/Refresh-Page-Issue-in-ASP-Net
    http://www.codeproject.com/Articles/10240/Detecting-Page-Refresh
    Thanks
    Patrick Liang
    TechNet Community Support

  • Invoke user Reports in a click of a button

    Hi All,
    i have created SQL queries for reporting purposes in the Query Manager and have designed a report layout for the same. How will i be able to invoke the report from the click of a button in an user form?
    Pls help me out...
    Thanks,
    Vishnu Kumar

    Hi Vishnu,
    Once you have added a report to the query manager you can find its "Menu UID" in the application menu Tools --> Queries --> User Queries
    Then use code to click that menu item:
    Application.Menus.Item("Menu UID").Activate()

  • Capturing navigation button click event

    Hi,
    Is it possible to capture the navigation button click events on a system form?For example when the goods receipt form is open and i click on navigation button on the tool bar.
    Can help with some sample codes?
    Thanks.
    Satish.

    Hi,
    Here you´ve got an example from the UI API help file.
    Private Sub SBO_Application_MenuEvent(pVal As SAPbouiCOM.IMenuEvent, BubbleEvent As Boolean)
        If pVal.MenuUID = "1288" Or _
            pVal.MenuUID = "1289" Or _
            pVal.MenuUID = "1290" Or _
            pVal.MenuUID = "1291" Then
          If pVal.BeforeAction = False Then
              Select Case pVal.MenuUID
                '// Under the If clause, check each item if it was clicked
                Case "1288"
                    oRecordSet.MoveNext
                    '// If reached EOF show last
                    If oRecordSet.EOF = True Then
                        oRecordSet.MoveLast
                    End If
                Case ...
                End Select
            End If
        End If
    End Sub
    To know the current form, you can use the ActiveForm property.
    Regards,
    Ibai Peñ

  • FileDialog.SAVE: trap the "Save" button click event

    Hello All
    Can anyone help me with FileDialog.SAVE, as to how we could trap the Save button click event? Is it possible to actually trap that particular event, rather than just checking for FileDialog.getFile() == null -> which indicates that "Cancel" button was selected.
    Any help would be highly appreciated
    Regards
    Naushin

    You can not do this, because FileDialog uses native dialog and all
    buttons on it are native (there are no java-components for them).
    Thus checking FileDialof.getFile() for null is only way to figure out
    whether user choose some file or not.

  • HOW TO CALL APPROVAL WORK FLOW ON BUTTON CLICK EVENT OF VISUAL WEB PART?

    Hiall,
    I created an OOB an approval work flow I want to start that approval work flow through visual web  part button click event
    In work flow Settings I selected to manually start .Is this possible ? if possible please guide me how to do this
    Thanking you,
    Arun  kumar

    Hi,
    If you have an instance of SPListItem, and know the workflow association name, you can start it. First you need to find workflow assocation instance and tell SPSite.SPWorkflowManager to start your workflow.
    See this for more information:
    http://blog.mmasood.com/2012/06/programatically-start-workflow.html
    Please remember to up-vote or mark the reply as answer if you find it helpful.

Maybe you are looking for