How to override Approve button for list item?

Hello,
Is there a way how to override the method that runs after list item is approved / rejected? I know there is a way for the Save button but I can't find how to do it for the Approve button.
I have a list with approval and workflow. Then I have a page that displays the items from the list in my webpart in a calendar/grid way. The items in the webopart have links leading to the display form with the item ID and Source parameters. Source parameter
leads back to this page. The background color of the item in the webpart is decided by the approval state of the item.
When user approves the item and the item form closes user is then sent to the page with the webpart (via the Source parameter) but the workflow takes couple of seconds more to process the aproval so the color is not changed when the webpart renders but if
the page is refreshed it shows the correct color because the workflow has finished.
I want to override the Approval method, let it update the item so the workflow can fire and process the approval, delay the form a bit and then continue as usual so when the user is redirected to the webpart page it would render with the correct state.
I can make a delay page that redirects to the webpart page and change the Source parameter in the items link to go there but it doesn't look that great.
Or maybe there is a way how to do it in Javascript? I am using it in the new item form using the SP.UI.ModalDialog.showModalDialog(options) function where the dialogReturnValueCallback refreshes the windows after 3 seconds.
dialogReturnValueCallback: function(dialogResult) {
        if (dialogResult == SP.UI.DialogResult.OK) {
         setTimeout(function(){window.location = "MyPageUrl"}, 3000)
Thanks for any tips and ideas!

you can try to achieve this via separate responsibility by personalizing the form by display false on the particular control button..

Similar Messages

  • I want a push button for line items in my sales order entry screen.

    Hi,
    I want a push button for line items in my sales order entry screen.
    How can I do so?
    Thanks.

    Hi Kumar ,
    To have a push buttons you need to first assign a pf-status .
    here a sample code for a push button and its handling :
      set pf-status 'SELECT' .
    at user-command .
      describe table t_lpr lines w_lines .
      case sy-ucomm .
        when 'SELECTALL' .
          set pf-status 'SELECT' excluding 'SELECTALL' immediately.
          do w_lines times .
            read line w_line field value w_check . " INTO W_CHECK .
            if w_check = space .
              w_check = 'X' .
              modify line w_line field value w_check.    "INTO W_CHECK .
              add 1 to w_line .
            endif .                        " IF W_CHECK = ' '
          enddo .
    Thus when you say pf-status say 'select' , Double click on that and you find a screen eher you can select icons and assign a function code to it!
    Hope it helps!
    Much Regards,
    Amuktha .

  • Adobe Revel?  I have forgotten:  the URL; my username and password.  How do I ask Adobe for these items?  Thanking your reply !!!

    Adobe Revel? I have forgotten: the URL; my username and password. How do I ask Adobe for these items? Thanking your reply !!!
    [email protected]

    Dave,
    No worries, this link will help you with your issues. You do have a revel account with that email, so resetting your password should be all you need to do. Just click on the "I forgot my password" link on the web page listed below:
    http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    Once you reset your password, you should be able to login to revel at adoberevel.com on a browser or from one of our apps on mac, ios, win8, or android.
    Pattie

  • How to define Approval Hirearchy for Fixed Assets?

    Hello All,
    Couls someone please tell me How to define Approval Hirearchy for Fixed Assets which should be different as compared to normal item purchase.Reply me ASAP
    Regards
    Aditya

    Hi,
    The AP invoice approval used AME rules for finding the approver. You can base you AME rules on virutally anything.
    In this particular case, you can base your AME rules on one of the followings:
    1. If any of the Distribution Accounts contain Fixed Assets natural account
    2. You can define a separate document category which should be used with invoices for FA Purchase and use the category in AME rules to find approver
    3. You can have a DFF at the Invoice Header level to indicate that this is a fixed asset purchase invoice and have this DFF to be used in AME rules.
    Gajendra

  • Workflow for list item cancels

    Hello!
    I create item in PWA list via timer procedure (c#).
    I have a workflow configured in SPD on item creation.
    In timer code I open a web from definet user, so item in list creates without any problem (author - this definite user), but workflow stops immediately with error:
    RequestorId: 47da81b9-1361-8e8e-2f05-c8376aa8939c. Details: System.ApplicationException: HTTP 401 {"x-ms-diagnostics":["3001000;reason=\"There has been an error authenticating the request.\";category=\"invalid_client\""],"SPRequestGuid":["47da81b9-1361-8e8e-2f05-c8376aa8939c"],"request-id":["47da81b9-1361-8e8e-2f05-c8376aa8939c"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"SPRequestDuration":["29"],"SPIisLatency":["1"],"Cache-Control":["private"],"WWW-Authenticate":["Bearer
    realm=\"2185ffaf-5b35-41d5-89ac-85ba7fd54a3a\",client_id=\"00000003-0000-0ff1-ce00-000000000000\",trusted_issuers=\"00000005-0000-0000-c000-000000000000@*,[email protected]7fd54a3a\"","NTLM"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1;
    RequireReadOnly"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"Date":["Fri, 12 Sep 2014 08:01:33 GMT"]} {"error_description":"The server was unable to process the request due to an ...
    When I run code with elevated privileges, workflow runs without error, but from system account (it looks like this, because workflow can't create Project from item and it creates tasks as Workflow, not as "Workflow from user").
    User profiles servises are running, I can find profile for user in central admin and c I can run full sync.
    I also have restarted IIS for1000s times...
    Help me please, how can I run workflow from specific user (I gave him even app admin permissions, but it still doesn't work)?
    From LOGS:
    The set of claims could not be mapped to a single user identity. Exception 3001002...
    The registered mappered failed to resolve to one identity claim...
    STS Call Claims Saml: Problem getting output claims identity...

    Hello!
    I have found solution.
    I have study dozen forums and sites about SP and this one
    http://stackoverflow.com/questions/6382583/use-credentials-to-interact-with-the-client-object-model-of-sharepoint gave me an idea.
    I had to rewrite my code. I set 
    using (ClientContext context = new ClientContext("http://yourserver/")) {
    context.Credentials = new NetworkCredential("user", "password", "domain");//here my code for list item creation}
    instead of 
    SPSite spsite = new SPSite(siteUrl, spusertoken);
    SPWeb web = spsite.OpenWeb();
    // and so on
    So, now SP has no problem with fiding initiator profile and workflows starts correctly automatically after an item was created.
    Maybe this solution could save somebody's day.
    Kate.

  • How to print vertical lines for line items?

    hi experts,
                    can any one tell me how to print vertical lines for line items in ascript?
    ive tried using sy-vline but its printing jus one line each for each item .i want it in columns ?if there are any control commands plz let me know how to print?
    thanks &regards
    narendar

    hi narendar,
    Welcome to SDN.
       u can go for box command.
    Use the box command with zero width for vertical lines.
    Position the line by x position and y postion.
    syntax :
    BOX <xpos> <ypos>
           <width>
          <height>
          <thickness in twips> twips.
    Regards,
    Arun.
    Reward points if useful.

  • How to override truncateToFit method for SuperTabNavigator

    Hi All,
               How to override truncateToFit method for SuperTabNavigator.
    we have editableLabel method for changing the tab name.
    it is dispalying the ... elipse when entered characters grater than the tab width. it is ok.
    but if the entered characters less than the tab width it is also appending the ... elipse.
    i dont want that . how to remove those. i dont want completely truncateToFit option.
    how to override .
    Can any help me regarding this?
    Thanks in Advance
    Raghu.

    Give me a sample codeNo. Read the links provided by Yannix, try it out for yourself, and if you still have a question, post the code you tried.
    db

  • How to add Gap between dropdown List Items - ComboBox in MFC VC++

    How to add Gap between dropdown List Items - ComboBox in MFC VC++

    Did you tried SetItemHeight() inside your App .
    Thanks
    Rupesh Shukla

  • How to remove leading zeros for an item number within quickviewer

    how to remove leading zeros for an item number within quickviewer. Pls help

    ask your abap guy to do  it. not portal guys business.

  • FRM-30351: No list elements defined for list item.

    Hello!
    i have a list_item with name NOMBRE and in a NEW_FORM_INSTANCE trigger i have the following pl/sql block to populate it:
    declare
         grp_producto recordgroup := find_group('RECORD_PRODUCTO');
         lst_item item := find_item('PRODUCTO.NOMBRE');
         status number;
    begin
         status := populate_group(grp_producto);
         clear_list(lst_item);
         populate_list(lst_item,grp_producto);
    end;
    when i run the form, this message appear
    FRM-30351: No list elements defined for list item.
    List NOMBRE
    and the list appear without elements
    ...can somebody explain me the solution or if i have to do another thing to populate the list?
    Thanks

    Hi Duncan!
    i rewrote the manually code and agregate the clear_list function that i think you refer with "Make sure that the block is empty before you do this". This work the first time but in the next time a change that i do in the database isn't reflected in the list, i think that my cursor mantain the old information, well, can you indicate me some way to clear the cursor or something similar? or explain me another solution?
    thanks so much!
    declare
    nombre_producto soportebwv2.producto.nombre%type;
    lst_item item;
    i number:=1;
    CURSOR cur IS
    select nombre
    from soportebwv2.producto;
    begin
    lst_item:= find_item('PRODUCTO.NOMBRE');
    clear_list(lst_item);
    open cur;
    loop
    fetch cur into nombre_producto;
    exit when cur%NOTFOUND;
    add_list_element(lst_item, i, nombre_producto, nombre_producto);
    i:=i+1;
    end loop;
    close cur;
    end;

  • No list elements defined for list item.

    hi master
    when i use list item and run then give this error
    FRM-30351: No list elements defined for list item.
    List PRODUCT_NO
    Created form file MODULE1.fmx

    Try posting your question to Forms

  • How to assign a button for attachment and send the data through browser ?

    Hi friends,
    How to convert to browser ?
    how to assign a button for attachment and send the data through browser ?
    Thanking you.
    Regards
    Subash.

    Refer to
    How to create a text box in ascreen painter?
    where another user (venkateshwar reddy) has asked a very similar question...
    Jonathan

  • How to set item level permission for list item in SharePoint 2013

    Hi we had a custom List "ABC".
    List had 2 columns:
    Project Name: (P1, P2, P3, P4, P5, P6)
    Project Leads: (PL1, PL2, PL3, PL4, PL5, PL6).
    All project Leads can have permission to edit only their Project (P1, P2, P3) like
    PL1 can edit P1
    PL2 Can edit P2.....
    But my Question is how to restrict PL2 cannot have permission to edit P1
    is it possible to set permission for this through OOTB in SharePoint 2013.
    Any help will be appreciated......

    Hi
    check this similar post
    http://social.technet.microsoft.com/Forums/ro-RO/e1ea3655-0c6f-4b3d-a336-c42e8eb54c09/rights-to-edit-own-items-for-list-residing-on-publishing-site?forum=sharepointdevelopmentprevious
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • How to allow user defined in list item to see item using only Designer. Approver set in list item can't see items they are to approve.

    SharePoint 2010 and Designer 2010.
    We have a list of items that users enter information into. Only the user who enters the data can see the item. It's confidential stuff. 
    One field is the name of the person who will approve this record.
    Workflow sends approver an email and sets a task to approve the item. 
    Problem is that the user set as approver cannot see the item. 
    We can't have a list of approvers - as all staff can potentially be approvers.
    We can't allow anyone other than the person who created the item and the person that is set as approver in a field to have access. 
    I am not a programmer, but a user of SharePoint Designer 2010. 
    (I did think we had this sorted by sending an email containing all the list item fields, but this task still requires permissions). 

    Hi ,
    I understand that after you grant user permission on current item ,the user still cannot approve the workflow task .This is because the user doesn't have approve permission in the Tasks list .You only grant the user permission on current item in current
    list ,so he can approve the item by clicking the Approve/Reject in the edit control block .
    Your workflow is correct ,now you need to grant the users Approve (a permission level) permission in the Tasks list settings .In this way ,the users can finish the tasks .
    Thanks
    Entan Ming
    TechNet Community Support

  • How to create a button icon list similar to Timesheet application

    Hi,
    Can someone tell me how to create an icon, with drop down list that looks and work similar to the button we can find in the Timesheet application in the URL below: http://apex.oracle.com/pls/otn/f?p=35222:LOGIN
    Thanks!

    Hi,
    Click your list region
    click the name of the list
    it will redirects to list property
    choose the name of the specific list item it will open for attribute setting
    choose image right side small button will pop up the existing images or
    upload your image [shared components] access #APP_IMAGES#image1.gif
    Thanks,
    Loga

Maybe you are looking for

  • PC UI for Leads in CRM 4.0

    Is anyone else using PC UI for Leads (CRMD_BUS2000108) or Activities (CRMD_BUS2000126)in CRM 4.0 with EP 5.0?  A contractor implemented the PC-UI in CRM 3.1.  We currently use EP 5.0 and are in the process of switching over to 6.0. Both portal versio

  • Doubt with WS Adapter in PI 7.1

    Hello everybody, I have a doubt regarding the WS Adapter in PI 7.1, I understood it works only for SAP Systems, am I correct?, I'm asking because I'm going to have a scenario like this Oracle Peoplesoft Payroll System-> SAP PI 7.1-> SAP ECC now I've

  • How to get message unique id?

    the purpose to do this update is, we want to get a interface depended sequense number, every message should have a unique message id, then use JDBC receiver adapter to insert this message to several DB tables, Legacy application program will use thes

  • Popup-window in BSP

    Hello, I am new at BSP's so I hope someone can help me. When I click on button in a BSP-page i call a popup-window using something like this function Popup(url){   window.open(url,"MyPopup",'height=100,width=300'); In that new window there are 2 butt

  • MaxLimit correlates with Internal Server 500?

    Recently we've seen a spike in the amount page requests returning Internal Server Error 500. Here are our current settings for <entry key="jdbc.InitialLimit">3</entry> <entry key="jdbc.MinLimit">1</entry> <entry key="jdbc.MaxLimit">10</entry> <entry