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 :
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,

I have the same question (0)
  • Fubar Profile Picture
    2,761 on at

    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

  • John Frometa Profile Picture
    20 on at

    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
    2,761 on at

    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
    20 on at

    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
    2,761 on at

    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
    20 on at

    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.

  • John Frometa Profile Picture
    20 on at

    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
    on at

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans