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 Apps / How to clear "web unsu...
Power Apps
Answered

How to clear "web unsupported syntax" issue in solution checker?

(0) ShareShare
ReportReport
Posted on by 15

The below mentioned is the error that I am facing for HTML Web resource which contains java script in it.

 

         ->I am trying to export my solution so ,before exporting the solution I need to run the solution by using solution checker in the power apps. So I have run my solution in that so I got this error.

 

 

"Unable to understand the syntax of this file. We currently do not support ECMA standards greater than version 5. We may have also encountered a true syntax error in the file. Please use a code editor that performs JavaScript validation, such as Visual Studio Code, to identify the script error locations. Note that other rules were unable to run on this file so the results are likely incomplete."

  • Moreover I have validated the code using visual studio and It is error free.
  • I have even removed the ES 6 version code and made it to ES 5 (for fetch).

could some please help me in clearing this issue.

 

Thanks in advance

Thanks,

Yamini

I have the same question (0)
  • MikeHuguet Profile Picture
    Microsoft Employee on at

    Apologies that you are encountering this issue. Does it provide you with a line number or anything that can help you zoom into what the specific syntax would be? The line number is relative to the script that is embedded and not the HTML file's line numbers. The tool generally assumes that if there is a syntax error of any kind or anything that our parser does not understand that it is an ECMA 6 problem. We are trying to fully move to another parser which will possibly clear this up for you, but that is taking time and we don't have an ETA yet. Usually, if there is some issues in parsing out the embedded JavaScript, the script has some tag building logic using concatenation that throws off the parser. Do you have any logic like that? If you find that is the case you could run it without that logic and address any issues and then put it back. You could also move any embedded JavaScript out to a js file. Usually, that is the better approach anyway and it may get you past this issue.

     

    If you are able to submit a support ticket with the file, then we can troubleshoot further.

  • Verified answer
    Ben Thompson Profile Picture
    1,400 on at

    When I had that problem I hunted for an es5 validator to see if it could highlight the actual problem and it turned out I had a couple of let rather than var commands.

     

    https://www.piliapp.com/javascript-validator/ was the tool I ended up using, just paste your code in and it should show you where the issues are.

     

     

  • Yamini_surineni Profile Picture
    15 on at

    Hi ,

    Thank you this helped me in clearing the issues.

     

    Regards,

    Surineni Yamini

  • Yamini_surineni Profile Picture
    15 on at

    Hi ,

    This is the error I am getting for HTML web resource :

     

    'parent.Xrm.Page' references or accesses a deprecated API in the client context object model. Replace this call with the following client context API: 'ExecutionContext.getFormContext'

     

    So can you please suggest me how to use ExecutionContext in HTML web resource.

    Thanks,

    Surineni Yamini

     

  • Ben Thompson Profile Picture
    1,400 on at

    https://docs.microsoft.com/en-us/power-platform/important-changes-coming seems to have been silently updated and it now says that parent.Xrm is on the list to be deprecated where previously support was continuing.

     

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/controls/getcontentwindow shows how to access the information nowadays. But note there is a possible race condition where you may call the function before the page is loaded - the open bug has setinterval code which will resolve that but you will need to replace the let s with var s to get past the validation checker.

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi  @ben-thompson 

    I wasn't aware that we have to use getContentWindow. I know about the deprecation of Xrm.Page and about the deprecation of ClientGlobalContext.js.aspx., and that the getContentWindow is a possibility (which I didn't took as reasonable, because this means that I have to include a form-script for each HTMLWebResource on the form).

     

    But in the link about the deprecation 😞https://docs.microsoft.com/en-us/power-platform/important-changes-coming#some-client-apis-are-deprecated) is stated

    - about deprecation of Xrm.Page: 

    "Although Xrm.Page is deprecated, parent.Xrm.Page will continue to work in case of HTML web resources embedded in forms as this is the only way to access the form context from the HTML web resource."

     

    - about the deprecation of parent.Xrm

    "Use one of the following:
    a) Use a custom control created using Power Apps component framework instead of HTML web resources.
    b) On forms, use the getContentWindow method of the web resource control.
    c) If the getContentWindow method doesn't work, you can use parent.Xrm to get to the Xrm object inside an HTML web resource. If the HTML web resource is opened in a new window then you should use opener.Xrm instead."

     

    So we can use parent.Xrm, but in that case we cannot pass the solution checker and the solution cannot get the certification?

    Best regards,

    Diana

  • MikeHuguet Profile Picture
    Microsoft Employee on at

    Are you talking about AppSource certification? The certification team is aware of false positives for some rules, including with this rule. Static analysis is not perfect.

  • MikeHuguet Profile Picture
    Microsoft Employee on at

    Are you using AppSource checker?

  • Yamini_surineni Profile Picture
    15 on at

    Hi ,

    I have cleared those errors and I passed my solution checker.

     

    Thanks,

    Yamini

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @MikeHuguet , 

    Yes, we have a lot of problems with Solution Checker and AppSource Certification because of using bundling & 3rd Party npm Packages in our WebResources (PCFs too): like using eval, parent.Xrm, using let & const (this is not ES5 but the all Dynamics 365 supported browsers support that).

    It makes us (the developer) spend a lot of time with justifying the implementation (to our customers and out boss), even if we didn't do anything wrong. 😥
    So we should just proceed with the AppSource Certification, even if the solution checker shows High-Issues?

    Best regards,

    Diana

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard