web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

cleanest and quickest way to redirect?

(0) ShareShare
ReportReport
Posted on by

Hello, I'm looking for the cleanest and quickest way to redirect. I have a view based on a custom entity. When the user double-clicks a row in the view, a form for the custom entity opens. However, when the form for the custom entity opens, I redirect to the CRM email form for a related email ID.

The redirect is coded in the onload event of the form. However, the form layout and controls are visible to the user for about 1 second before redirecting to the email form. This looks kind of clunky. I'd like the redirect to look more seamless, so it looks like there is no intermediate form. Do you know if there's a way to do this? The onload event of my form uses the following script:

window.top.location.href = redirectUrl;

This successfully performs the redirect, but I was wondering if you knew of a way to execute this redirect more smoothly/quickly?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vijay Waghmare Profile Picture
    on at

    Instead of opening and then redirecting form based on email id you can follow below steps,

    1 – Create a single line of text attribute/field for your custom entity of type “URL”.

    2 – Whenever you are creating or updating custom entity record, based on email id, create a link/url and map it to newly created “URL” attribute. (This can be done using simple JS or workflow)

    3 – Add this “URL” attribute to your custom entity subgrid.

    4 – Whenever user clicks on that “URL” column data, user will redirect to the mapped URL.

    This will surely avoid delay in opening and then redirecting user to intended form.

    Hope this helps.

    Thanks,

    Vijay Waghmare

  • Suggested answer
    Rugved Gokhale Profile Picture
    on at

    You can create a "single line of text" attribute of type of URL on a entity form. Fill this attribute with a URL you want to redirect to i.e. value of "redirectUrl".

    Add this field as a column in your view so that whenever your view is loaded, this column will be available as a clickable URL, to which users can click directly from view to navigate to destination form instead of navigating to this from "form on load".

    This should eliminate your intermediate form. Also, you can choose to hide this URL field from youe entity form on load so that user's won't see this in case they open the entity form by double clicking on view.

  • Rugved Gokhale Profile Picture
    on at

    Sorry. Didn't noticed that same answer was already given.  :)

  • Community Member Profile Picture
    on at

    Allowing the user to double-click anywhere in the row is a better user experience.  Giving the user a larger clickable area allows the user to navigate with less deliberation/thought.  The solution suggested above requires the user to click on a specific url in a specific column.  This is inconsistent with the double-click approach used throughout CRM.

  • Vijay Waghmare Profile Picture
    on at

    “Double Click” approach is provided only for items displayed in view or subgrid in CRM. The purpose of having “Double Click” on row is to open the respective record to view complete information.

    The “URL” approach proposed above is natively provided to navigate to desired location with a single click such as “Left Hand Navigation”, “Ribbon Button” or even columns displayed in subgrid /view like “Created On”, “Modified On”, “referenced/related entity columns” or even the primary attribute of record “Name” to view its complete information.

    Since you are looking for “cleanest and quickest way to redirect” for your implementation, “URL” is the best approach to achieve it.

    The way you have implemented currently will mislead user as you have some sort of code on “On Load” event for your custom entity to navigate to some other URL. By this, user will not able to view actual information present for that record, as you are anyways redirecting user to a different form than user intended page.

    Still you are looking for double click approach to accomplish your functionality then you can hijack “Double Click” event of respective grid, fetch the information based on clicked row’s GUID. Build proper URL and then open it. This will avoid having intermediate page to construct URL and then redirect.

    Refer below URL to hijack / override “Double Click” event of subgrid. This approach will contradict title.

    stackoverflow.com/.../override-standard-method-called-by-double-click-event-in-crm-grid

    Thanks Rugved, for sharing similar solution here, that confirms solution provided by me is a possible way to implement/resolve given issue.

    Thanks,

    Vijay Waghmare

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans