Skip to main content

Notifications

Community site session details

Community site session details

Session Id : edh3d6Fyi3rAJgNMpjBKR7
Power Pages - General Discussions
Answered

Unable to save custom code in powerpages vs code editor

Like (0) ShareShare
ReportReport
Posted on 22 Dec 2023 12:14:21 by 24

Hi Everyone,

I am currently working in a powerpages project and I am using custom code  for every requirement. Recently I have encounter an error while saving custom code in vs code editor. It does not allow me to save and this error is occurring frequently whenever I added new code. This error is not related to my code(I think) and I am also not able to find the solution regarding the error. I have also shared the screeen shot below. Can anyone help me in this?

Categories:
  • Verified answer
    Saud Ali Profile Picture
    812 Super User 2024 Season 1 on 27 Dec 2023 at 09:18:58
    Re: Unable to save custom code in powerpages vs code editor

    Hi @RohitAswal , 

     

    As I said in my earlier comment, Web File is best option. Web Templates and Web Files have a completely different purpose. Web Files are using to store your portal assets (css, js, images). And Web Templates provide you with actual HTML code for your pages. You, of course, can write a js code as a part of your Web Template (and you often will) but is not a most reusable scenario if you want to use that code in multiple places. So, better to move in Web Files.

     

    Feel free to ask, if you have any questions and Mark answer as a Solution to enable other users find it.

     

    Thanks,

    Saud

     

    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.

  • RohitAswal Profile Picture
    24 on 27 Dec 2023 at 07:53:32
    Re: Unable to save custom code in powerpages vs code editor

    Hi @saudali_25 

    I finally found the reason why it was not working, the reason was due to my file having reached its maximum limit.

    I have added my function inside a web template and now it is working fine.
    Just want to know if this approach is good?

  • Saud Ali Profile Picture
    812 Super User 2024 Season 1 on 23 Dec 2023 at 00:54:52
    Re: Unable to save custom code in powerpages vs code editor

    Hi  @RohitAswal , 

    There could be couple of reasons to this error. Try following:

     

    • Take backup, change your browser, clear cache and try save.
    • Ensure internet connection is stable.

    Sometimes due to large size of file can cause this issue. To check this, try cut out some code and try to save your file. If it works, most likely you've reached the maximum limit, and you can move your changes to another Web File.

    Please try above and share if it works for you.

     

    Thanks,

    Saud

     
    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.

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,769 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started