Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Portal Steps Form. Need Prevent open second step using the URL from address bar.

(0) ShareShare
ReportReport
Posted on by 20

I have one basic question probably, I am currently using a Web Form with a couple of Steps, I need to prevent the user to go to the second step if the first step is still not validated. Currently, if the user enters to the first step (tab 1), click on Next, then the second step gets displayed which is good and expected, if I copy the URL from the address bar at this point, and send it to someone else, then that user is able to open the second step directly bypassing the first one, so this is what I need to prevent.

I tried using step Condition on the second step, if the condition is not met then return to the first one (this is good), however when the condition is met I can only see a successful message instead of that tap information.

Any Idea on how to achieve this?

Thank you,

  • Suggested answer
    Pranjali Profile Picture
    Pranjali on at
    RE: Portal Steps Form (Prevent open second step using the URL from address bar)

    Duplicate of community.dynamics.com/.../portal-steps-form-need-prevent-open-second-step-using-the-url-from-address-bar.

    Please delete this post

  • John Frometa Profile Picture
    John Frometa 20 on at
    Portal Steps Form (Prevent open second step using the URL from address bar)

    I have one basic question probably, I am currently using a Web Form with a couple of Steps, I need to prevent the user to go to the second step if the first step is still not validated. Currently, if the user enters to the first step (tab 1), click on Next, then the second step gets displayed which is good and expected, if I copy the URL from the address bar at this point, and send it to someone else, then that user is able to open the second step directly bypassing the first one, so this is what I need to prevent.

    I tried using step Condition on the second step, if the condition is not met then return to the first one (this is good), however when the condition is met I can only see a successful message instead of that tap information.

    Any Idea on how to achieve this?

    Thank you,

  • John Frometa Profile Picture
    John Frometa 20 on at
    RE: Portal Steps Form. Need Prevent open second step using the URL from address bar.

    I was able to control the same session to be opened by a different authenticated user utilizing some custom javascript code, in this case, I simply setup the webform to capture the portal user id in the first step and store it in my custom entity, then in second step through oData, I query that id and compares it with the current user id, if they don't match I redirect to first step.

    This is done and successful when it is a different user; now I still need to prevent the same user to re-use the second step URL later, meaning to make it valid only once.

    I recently spoke with one of the Microsoft support and he explained that all sessions are collected in the entity (table) called: Web Form Sessions, but the issue here is that those sessions are valid forever, I don't see the way of killing them or delete them.

  • Fubar Profile Picture
    Fubar 2,752 on at
    RE: Portal Steps Form. Need Prevent open second step using the URL from address bar.

    The sessions side of things is all handled by Microsoft (and behind the scenes it is ASP.NET). Where you could see a problem like you describe would be if you are in the Same browser and using just another Tab, rather than a completely different Browser or machine etc.  (the navigation etc is controlled by a Session record that you can see under the Related entities tab on the Web Form)

    I'm not sure if you have changed any of the default settings on the Web Form and if this is causing the problem or not, as I said, when I try it here my second user does not get the second step (gets pushed to the starting step) - you may need to log it with Microsoft.

  • John Frometa Profile Picture
    John Frometa 20 on at
    RE: Portal Steps Form. Need Prevent open second step using the URL from address bar.

    I did that test also, in the second step I copied the URL, sent it to another authenticated user, and he was able to open the second step, this is exactly what I need to avoid. Normally on ASP.NET we control this situation by sessions, here in the portal step form I don't know how to do that.

  • Fubar Profile Picture
    Fubar 2,752 on at
    RE: Portal Steps Form. Need Prevent open second step using the URL from address bar.

    Not sure what you have setup, but this doesn't happen for me (it does if I am using the same portal user in a different browser but not if using a different user).

  • John Frometa Profile Picture
    John Frometa 20 on at
    RE: Portal Steps Form. Need Prevent open second step using the URL from address bar.

    Thank you for your answer, but if you read my question well, I am asking a different thing, I don't need to validate the first step which has all needed custom validations right now, what I need is to prevent opening the second step by copying and pasting the URL from the address bar. If you actually click on Next, if all validations are good, then you move to the second step, here if you copy the URL from the address bar and send it to another user, this user can directly navigate to the second step simply by pasting the URL in the address bar. I want to have the second step sealed and only accepting someone if it's coming from the first step only.

  • Fubar Profile Picture
    Fubar 2,752 on at
    RE: Portal Steps Form. Need Prevent open second step using the URL from address bar.

    Add custom validation to your form.  Note, in the link below the first code block is for Entity Form validation, the second code block is for WebForms (webforms Next call a diferent validator to that used for Entity Forms i.e. webFormClientValidate is called)

    docs.microsoft.com/.../add-custom-javascript

    docs.microsoft.com/.../add-custom-javascript

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans