Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Options to perform Client Side/ Server Side validations on portal forms

Posted on by 55,410

Hi,

I have configured Customer Service portal and have some requirements to put client/ server validations and display error message when users submit the web form.

How can these be achieved?

For example,

1)  Show error 'Field not populated' if a particular field is not populated

2) Show error 'No records exists in Sub entity' if the child entity doesn't contains any records. 

*This post is locked for comments

  • nickmanny Profile Picture
    nickmanny 136 on at
    RE: Options to perform Client Side/ Server Side validations on portal forms

    Check this one..Clientside Vs. Serverside Validation

  • RE: Options to perform Client Side/ Server Side validations on portal forms

    Hey guys,

    I solved my problem, I had issues with my metadata and entity permissions. I had to properly reconfigure them all over again.

    Thanks.

  • RE: Options to perform Client Side/ Server Side validations on portal forms

    Hello AK3800

    Thanks for answering me =)

    While I was waiting for help, I tried and deactivated all plugins and workflows and the error still persisted. I also verified if someone changed the CRM form names and hasn´t change in the Portal entity or web forms because it's one of the reasons that can cause that error (for people who might be interested), and they where okay.

    Is there anyway that I can identify where am I going wrong and solve this problem?

    Thanks in advance,

    Joao Rodrigues

  • AK3800 Profile Picture
    AK3800 72 on at
    RE: Options to perform Client Side/ Server Side validations on portal forms

    Hello Joao,

    In my implementation I have D365 portal and CRM online.  Everything from the portal runs as the SYSTEM user, so to avoid issues with plugins or workflows I've modified them to skip out of their normal logic if the context user is SYSTEM.

  • RE: Options to perform Client Side/ Server Side validations on portal forms

    Hello Emmaneul James Abraham,

    I have plugins and workflows that are required by my client, is there any way possible to bypass those fatal errors?

    I have an entity that needs to have those plugins and workflows, and i also need to display entityforms/webforms of that entity. Im using an on-prem portal and its been really hard to find some help.

    Thanks,

    Joao Rodrigues

  • Suggested answer
    Summer Garg Profile Picture
    Summer Garg 585 on at
    RE: Options to perform Client Side/ Server Side validations on portal forms

    Hi Ravi,

    You have to use JS to apply client side validation.

    Check this article :

    crmhub.blogspot.in/.../apply-client-side-validation-in-d365-portal-ADX-Studio-Portal.html

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Options to perform Client Side/ Server Side validations on portal forms

    Thanks Arpit.  Will try these options.

  • Verified answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Options to perform Client Side/ Server Side validations on portal forms

    Hi Ravi,

    If you want to perform Client Side Validations, you can refer my below article for the same :

    http://arpitmscrmhunt.blogspot.in/2017/01/client-side-validation-using-javascript.html

    If you want to put conditions based on current form fields then you can directly use Client side validations while If you want to perform validations based on some other entities data in that case you can use Synchronous Odata to fetch the result and then use the same validations as mentioned above.

    You do not have server side code handler in CRM Portal, though you can use Odata to fetch data and put conditions based on that.

    For use Odata in Adxstudio/CRM Portal - Refer my below article:

    http://arpitmscrmhunt.blogspot.in/2016/12/adxstudio-portal-how-to-use-odata.html

    Cheers

  • Parashuram  Profile Picture
    Parashuram 381 on at
    RE: Options to perform Client Side/ Server Side validations on portal forms

    Hi Ravi, I assume that u r developing portal forms in .net component then in the web solution add required sdk assemblies. Do server side operation like checking data in entity and all.Give appropriate message after validation.

    If u r doing it in adx portal or now it's the part of D 365, need to do R and D to me.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Options to perform Client Side/ Server Side validations on portal forms

    Thanks Parashuram.

    Could you share some details on how to integrate web form or pages with SDK?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans