Forums

Forums / Developing Portals / Page redirect on a condition

Page redirect on a condition

Thread is closed for posting
4 posts, 1 answered
  1. smehdi
    smehdi avatar
    40 posts
    Registered:
    23 Mar 2015
    12 Jun 2015
    Link to this post
    Hi,
    Can I redirect to a page based on the particular value of a pick list using rules manager?
    Regards,
  2. Clinton Bale
    Clinton Bale avatar
    126 posts
    Registered:
    21 Feb 2014
    12 Jun 2015 in reply to smehdi
    Link to this post
    Hello Shan,

    You cannot do this using the Rules Manager but you can do this using the JavaScript API by calling get_value on the CRM Picklist and going from there.

    Regards,
    Clinton
  3. smehdi
    smehdi avatar
    40 posts
    Registered:
    23 Mar 2015
    16 Jun 2015 in reply to Clinton Bale
    Link to this post
    I'm successfully using the PassValueToQuerystring etc properties of a lookup to redirect the page. The way I've setup the filters, ​​this lookup is populated and set automatically for a certain condition. This setup is working very well for me, however, when I try to hide this ​Lookup, the redirect never ​occurs. It seems that my script does not fire if the lookup is read-only or hidden. It there a work around?

    $(window).load(function() {
        $find($(".CrmLookup_C041").attr("id")).get_cboLookup().get_items().getItem(1).select()
        }
    );
  4. Clinton Bale
    Clinton Bale avatar
    126 posts
    Registered:
    21 Feb 2014
    Answered
    16 Jun 2015 in reply to smehdi
    Link to this post
    Hello Shan,

    You'll have to hide the control using CSS and the display style. "display: none;"

    If you hide it using the Sitefinity Visible property or using ReadOnly, the functionality will no longer be present on the page and you cannot do the same logic as you could when the CRM Lookup is there.

    Regards,
    Clinton
4 posts, 1 answered