web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Inconsistent error Mes...
Power Pages
Answered

Inconsistent error Message location on screen

(1) ShareShare
ReportReport
Posted on by 96

Hi,

I am trying to show a synchronous workflow error message on create of a record. The record is being created using Advanced forms. The message is showing up on the form, but it is showing at a different location compared to the other validation messages (See Screenshot). Is it possible to show the error message from the workflow at the same location as the other validation messages, or as a popup on the screen? 

error.png

Categories:
I have the same question (0)
  • eugenevanstaden Profile Picture
    441 on at

    There are differences in how the error messages are generated in Advance forms vs Basic forms, especially errors triggered from plugins/workflow etc.

    On the advance form it sits outside but you can try and move it with JS to the preferred location.

    I raised this sometime back also.
    Plugin Error message differ between Webform and En... - Power Platform Community (microsoft.com)

  • Manish R Sharma Profile Picture
    96 on at

    hi @eugenevanstaden can you give me some pointers on how to move it to another location ? I am not very familiar with DOM manipulation.

  • Verified answer
    eugenevanstaden Profile Picture
    441 on at

    @PortalNewbie 

    As the alert item does not have an ID or reference you can use as selector, what I do is return a string as the custom error message (id_plugin_error), which I then use to select and move the item and present a predefined message. 

     

     var alertElement = $("p:contains('id_plugin_error')");
     if (alertElement .length) {
     $(alertElement ).parent("div").remove();
     $("div.tab.clearfix").prepend('<div class="alert red" id="delete-failed" role="alert" tabindex="0"> <div class="cell"> <i class="fa fa-warning"></i> </div> <div class="cell"> <h4>Custom Header</h4> <p>Custom Error message</p></div> </div>');
     }

     


    This is what the error message markup will look like for the Advance form

     

    <p class="text-danger"><span class="fa fa-exclamation-triangle" aria-hidden="true"></span> An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): DummyPlugin.ThrowErrorPlugin: System.Exception: This is a dummy error </p>

     


    As compared to the Basic Form which at least have an id of MessagePanel. This is a bit inconsistent and ideally should  be fixed by Microsoft.

    <div id="MessagePanel" class="message alert alert-info alert-danger alert-danger" role="alert">
    		<span id="MessageLabel" tabindex="0"><p class="text-danger"><span class="fa fa-exclamation-triangle" aria-hidden="true"></span> An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): DummyPlugin.ThrowErrorPlugin: System.Exception: This is a dummy error</p></span>
    	</div>




  • Manish R Sharma Profile Picture
    96 on at

    @eugenevanstaden - Thank you. I will try this out and will let you know how I go.

  • Manish R Sharma Profile Picture
    96 on at

    @eugenevanstaden - Tried this out recently and it worked. Thanks a lot !

  • shubham_7 Profile Picture
    110 on at

    Thank you😊

  • shubham_7 Profile Picture
    110 on at

    Thank You

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 50

#2
Valantis Profile Picture

Valantis 26

#3
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard