Page 1 of 1

5.1 MVC Issue with View Parameters being passed to webpage by hyperlink

Posted: September 21st, 2022, 2:56 pm
by mollydunn
I ran into an issue where on a webpage, WorkWithAccounts, that shows a list of all accounts, where each row contains a hyperlink to the AccountHome webpage. I needed to pass in the ViewParameters so that when the user clicked on the link, it took them to the correct AccountHome page and not just their own. I was having an issue where when any AccountHome link was clicked, it forwarded to the AccountPage for the user who was currently logged in. I was able to solve the issue by changing the parameter property values, and clearing the filters I was using for my search. I am now reapplying the filters to be sure it functions properly with the search filters, but in the meantime here are the corrected parameters that allowed the link to work properly on my page.

The parameters set for the hyperlink properties on the WorkWithAccounts webpage canvas:
image.png
The parameters for a submethod in the model for the AccountHome webpage:
image.png

Re: 5.1 MVC Issue with View Parameters being passed to webpage by hyperlink

Posted: July 31st, 2023, 10:37 am
by CathyC
This is a feature of EASYCommerce which should be similar in other implementations.

The features is:
  • When loading the page with a query string for a specific account, load the info for that account
  • When loading the page with no given query string, load for the logged in user's web account based on their user session variables
The issue was that an admin could load the admin page "Work with Accounts" and when they clicked into one of the accounts to go to the "Account Home", the query string would not be passed along. So the account home page opened and hit the case where no query string was given. So it loaded for the admin's web account and showed the internal account instead of the account the admin clicked on.

The fix Molly described accomplishes the intended functionality of the feature.