Forums

Forums / Developing Portals / Redirect to a page with id of the new record in CRM.

Redirect to a page with id of the new record in CRM.

Thread is closed for posting
8 posts, 2 answered
  1. quanganh
    quanganh avatar
    33 posts
    Registered:
    16 Jun 2016
    09 Aug 2016
    Link to this post
    Hello,

    I want to redirect to a page with id of the new record in CRM after insert/update
    e.g. After click in submit button to create the new contact I want to redirect to the another page
    /contact-detail?contactid=<<<​the contact id which ha​s just created>>>

    Many thanks,
    Quang Anh
  2. Missing user
    Missing user avatar
    09 Aug 2016 in reply to quanganh
    Link to this post
    Hi Quang,

    Can you please confirm if it is user registration form or not? Because, if you are creating a contact record in order to create a portal user and need to display information on following forms based on his/her contact id, the best way to do is to re-direct the user to login page. Once the user log in, the contact id is automatically set in the session. You can also get the logged in user  contact id using TPC API ​in javascript widget on the form by using this sample code;

    var contactid=tpc.identity.contactId;


    You can find more details and examples about using TPC client side API  at http://www.crmportalconnector.com/developer-network/documentation/help-file/client-side-api

    Thanks
    Syed
  3. quanganh
    quanganh avatar
    33 posts
    Registered:
    16 Jun 2016
    09 Aug 2016 in reply to Missing user
    Link to this post
    Hi Syed,

    Thanks you for your answer. I just give a simple example for your easy understand my question.
    Infact, I have a custom entity. And I need the new id to reload the new record in another page.

    Is there any client side API to do this ?

    Many thanks,
    Quang Anh
  4. Missing user
    Missing user avatar
    09 Aug 2016 in reply to quanganh
    Link to this post
    Hi Quang,

    I need to see your forms to guide you further on this. Can you please tell me what Canada EST time works good for you tomorrow​? I will schedule a TPC Q & A session with you to help you out.

    Thanks
    Syed
  5. quanganh
    quanganh avatar
    33 posts
    Registered:
    16 Jun 2016
    11 Aug 2016
    Link to this post
    Hi Syed,

    I'm sorry I cannot join the TPC Q & A session in Canada EST time. I'm living in Viet Nam.
    Ideally I have a simple form to create new record in CRM with draft status after that I want to redirect to another page which have a form to update the new record. (e.g. update name + status)

    The point is I don't know how to get the guid id of new record and set it into query string of update page.

    Many thanks,
    Quang Anh
  6. Missing user
    Missing user avatar
    Answered
    11 Aug 2016 in reply to quanganh
    Link to this post
    Hi Quang,

    If the other page has to update the same record you created in previous step, you can simply use multi-form step or multi-page step widget. You can place the multi-form/page step button and configure it to go to next form/page.  By using the multi-form/page button where you are navigating from one form to other form for the same record entity, you don't need to get and pass new record guid in query string to fetch records on next page, it will do it automatically.


    However, if you are looking to pass some specific values as query string parameters, you can find that under most of the widgets (Edit-->Advanced) at form such as Lookups, there is a property "PassValueToQueryString", by default it is false, you can turn it to true. You will then need to go to page where you have this form under the CRM Form Manager --> edit --Advanced, find the property named "RedirectWithAllQueryStringParamters" and set it to true.


    Thanks
    Syed
  7. quanganh
    quanganh avatar
    33 posts
    Registered:
    16 Jun 2016
    11 Aug 2016 in reply to Missing user
    Link to this post
    Hi Syed,

    I try using the step page. But in config next page I can find my page. It seems like that this config just suport english page, isn't it. 

    With "passvaluetoquerystring" how can I pass the guid id of new record?


    Many thanks,
    Quang Anh
  8. Missing user
    Missing user avatar
    Answered
    11 Aug 2016 in reply to quanganh
    Link to this post
    Hi Quang,

    If you are using multi-page step widget on let's say French version of your form, and you have the French Page created using the respective form, it will support the French language page.


    As I mentioned before, if you are using the multi-page or multi-form step widget, you don't need to use passguid of new record to next page as long as the entity used on current and next page are  same.

    Thanks
    Syed 
8 posts, 2 answered