cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

PowerApps Portal: error message when submitting a form on the portal page

Hello Community,

 

On my custom PowerApps portal, I have a web page with an entity form on it, where users can basically fill in data and submit the form. When the form is submitted, behind the scene it will create a Lead entity record in the Dynamics 365 instance that's connected to the portal.

 

I am experiencing a very odd error message on the submission page. When clicking on the Submit button to submit the entity form on the web page, the following error message pops up. This is very puzzling because I am only getting this error when login to the portal as certain users, but the same submission process works fine if I login to the portal as some other different users.

 

I already checked entity permissions and all that, and everything seems fine. I am really lost as to what might be causing this error message.

 

Does anyone have any clues? Thank you!

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
OliverRodrigues
Super User
Super User

take a look at this video: https://www.youtube.com/watch?v=F8QxoyOIzAc

 

it might help you indicating where the error is

 

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

View solution in original post

Hi @Anonymous ,

Actually, it is an known limit with the LookUp field in PowerApps Portal, I afraid that there is no direct solution to achieve your needs in PowerApps Portal.

 

If you would like to get further help in this issue, please consider submit an assisted support ticket through the following link:

https://powerapps.microsoft.com/en-us/support/pro

 

If the solution I provided above is helpful in your scenario, please also consider go ahead to click "Accept as Solution" to identify my reply as helpful.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

14 REPLIES 14
v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Have these certain users been assigned with proper Web Role in your custom Portal?

Have you assigned proper Entity Permission (related to your Lead Entity) to the Web Role (which is assigned to these certain users )?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Firstly, please make sure you have created a Entity Permission with proper privileges for your Leads Entity in your Portal as below:

1.JPG

 

And then create a proper Web Role in your Portal or use the existing web role, then assign the above Entity Permission to this Web Role as below:

2.JPG

 

After that, assign above Web Role to these specific contacts (created for these certain users) in your Portal.

3.JPG

 

Then go to your Portal Designer, then click "Sync Configuration"-> "Browse Website" button to make the changes you made in your Portal take effect.

 

 

More details about assigning Entity Permission in Portal, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/assign-entity-permissions

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello,

 

I have confirmed that I have the right web role and entity permissions in place, but I am still getting the same error. Below is the details of the error. Does anyone know what this means? What could be the problem?

 Server Error in '/' Application.


Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
   System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +11822878
   System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +143
   System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) +86
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +558
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4231
Anonymous
Not applicable

I did some further research into the above error I am getting, and I came across the following blog discussions that seem to be explaining the problem I am having. In my scenario, I have one lookup field on the lead entity form on the portal page, which I then converted into drop-down and apply some filter on this drop-down using JS.

 

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/298329/use-the-clientscriptmanager...

 

According to the last post in the article, it says the dropdown list will only show the first 5000 records. So if I have more than 5000 records in the entity I am looking up, and the value I select is not in the first 5000, I will get the above error message...and the user who posted this mentioned this is currently a limitation on the portal.

 

Does anyone know if there is a way around this? And how does the system determine the first 5000 records, is it based on the name field of the entity for sorting the first 5000 records?

 

Any insights would be appreciated!

Hi @Anonymous ,

Regarding the issue that you mentioned, I think this issue may be related to the 'Validation Event' in your current web page of your Portal.

 

Please consider go to your Portal Management, then find the specific Web Link Set your current web page related to:

5.JPG

then switch to "Links" option, then find the specific Web Link corresponded to your current web page (where the issue is), then select it and click "Edit" option:

6.JPG

within the opening Web Link, locate at the "Link Options" section, then check the "Disable Page Validation" option as below:

7.JPG

then click "save" button. After that, go to your Portal Designer, click "Sync Configuration"-> "Browse website" button to make the changes take effect, then check if the issue is solved.

 

Also please check if the following article would help in your scenario:

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/298329/use-the-clientscriptmanager-registerforeventvalidation-method-in-order-to-register-the-postback-or-callback-data-for-validation

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
OliverRodrigues
Super User
Super User

take a look at this video: https://www.youtube.com/watch?v=F8QxoyOIzAc

 

it might help you indicating where the error is

 

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

Anonymous
Not applicable

Hi @v-xida-msft ,

 

I followed exactly what you suggested to disable the page validation. Unfortunately, the same problem persists...

Hi @Anonymous ,

Have you tried the @OliverRodrigues 's video resource? I think it would be helpful in your scenario.

 

Currently, I could not reproduce your issue on my side. Have you referred to the response from the Schjoermann in the thread I provided above? I guess this issue may be related to limitation of lookup fields rendered as dropdowns in the portal.

Spoiler
"

I came to the conclusion that this is a limitation of lookup fields rendered as dropdowns in the portal.

The dropdown list will only show the first 5000 records.

So if you have 7500 records in the entity you are looking up, and you filter the list to only show 7. If the one you then select from the 7, is not part of the first 5000 in the original list you will get the above error.

I created a case for Microsoft on this issue, and they say that this is by design.

"

On your side, please check if you have configured a LookUp field rendered as Dropdown within a Entity form on your current Web page, and the LookUp field have more than 5000 records.

 

If the issue still exists, please consider submit an assisted support ticket for further help through the following link:

https://powerapps.microsoft.com/en-us/support/pro

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-xida-msft ,

 

Yes, the issue I am having is related to limitation of lookup fields rendered as dropdowns in the portal, as we have more than 5000 records in the lookup. 

 

We are looking into other workaround options.

 

Thanks again for the insights and information, much appreciated!

Hi @Anonymous ,

Actually, it is an known limit with the LookUp field in PowerApps Portal, I afraid that there is no direct solution to achieve your needs in PowerApps Portal.

 

If you would like to get further help in this issue, please consider submit an assisted support ticket through the following link:

https://powerapps.microsoft.com/en-us/support/pro

 

If the solution I provided above is helpful in your scenario, please also consider go ahead to click "Accept as Solution" to identify my reply as helpful.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

MPP IDEAS updated 768x460.png

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Top Solution Authors
Users online (2,668)