Redirecting from/to Library screen in a custom entity (asp)

  • Hi,

    I am trying to build some workflow that will launch a document stored in the document library against our custom 'visit' entity. I have been successful in doing this but when I use the Save/Cancel buttons from the library edit screen it always returns me to a list of documents for the entire CRM :

    What I would like to do is have more control of where you are re-directed from after the libary edit screen. Ideally I would like to redirect back to our summary page afterwards.

    Below is the asp I have created so far to launch the library screen :

    var sURL=new String( Request.ServerVariables("URL")() + "?" + Request.QueryString );
    var strURL = eWare.URL(341) +
     +"&Key0=58"
     +"&Key5=" + eWare.GetContextInfo("user","user_primarychannelid")
     +"&Key15=" + library.libr_libraryId        
     +"&Key37=" + UseId +                  
     +"&Key58=" + UseId +
     +"&Key-1=58"
     +"&PrevCustomURL="+sURL
     +"&T=Visit";                
    Response.Redirect(strURL);

     

    Can someone provide some suggestion on what I could do to make it redirect to a different page afterwards?

    Thanks!

  • Hi,

    I assume that you have a custom entity named “Visit” for which you have enabled workflow too. In the workflow there is button on which you have redirected user to the defined library record which works as expected. You have an issue with the Save/Cancel functionality of Library edit. Redirecting to expected screen is all about playing with J (Jump to) and F (From) parameters in the previous URL.

    You can try to configure the redirect URL which you have mentioned as below:

    lcPreURL=eWare.URL("Visit/VisitSummary.asp");
    lcPreURL=lcPreURL.split("&");
    lcPreURL=lcPreURL[0]+"%26Key0=58%26Key37="+UseId+"%26Key50=648%26Key58="+UseId+"%26J=Visit/VisitSummary.asp%26F=Visit/VisitLibrary.asp%26jobs_JobsID="+UseId+"%26T=Jobs"

    var strURL = new String(eWare.URL(341));
    strURL=strURL.split("&");
    strURL=strURL[0]+"&Act=341&Mode=1&CLk=T"
    +"&Key0=58"
    +"&Key5=" + eWare.GetContextInfo("user","user_primarychannelid")
    +"&Key15="+ library.libr_libraryId +"&Libr_LibraryId="+ library.libr_libraryId        
    +"&Key37=" + UseId                   
    +"&Key58=" + UseId + "&jobs_JobsID="+UseId
    +"&Key-1=58"
    +"&PrevCustomURL="+lcPreURL

    Response.Redirect(strURL);  

    HTH.

    Sincerely,
    Dinesh

    --------------------------------------------------------------------------------------------------------------------------------------
    New Release - Sage CRM for Sage ERP X3 - real-time, bi-directional, anywhere access.
    Celebrating 900+ Sage CRM Posts
    - http://www.greytrix.com/blogs/sagecrm/
    Sage Premier Gold Development Partner - Sage X3, Sage 100/300/500/Pro ERP & Sage CRM
    *Sage CRM Gold Development Partner of the Year 2004 and 2011*
    E-mail: crm@greytrix.com |  Twitter: greytrix

  • Thanks for your help Dinesh, I have now managed to get it working for me now.

  • Hi Dinesh,

    Have you perhaps got something like this for .Net? The upload redirect works perfectly, but the edit does not function at all.

    Regards,

     Kev