EricP.
EricP.

Reputation: 489

How can I stop Generate Customization Script from deleting/ignoring my added ASPX code?

It seems that sometimes, not always, when I add code to an ASPX page via Customization Project -> Screens -> -> Actions -> Edit ASPX and click Generate Customization Scripts, it deletes what I added. What I'm adding doesn't contain any errors as I write it in VS and then copy and paste it into the editor. This sometimes work and sometimes does not. When it does not work, I cannot make changes no matter what I do.

Is there a way to prevent Generate Customization Scripts from deleting the code I add?

Is there a way to edit and see changes to ASPX files after publishing via Visual Studio instead of using the browser editor?

Upvotes: 1

Views: 350

Answers (2)

Brendan
Brendan

Reputation: 5623

Are you testing your changes directly in the aspx page that you are customization to an existing screen?

I assume this is the case and I have found when I go and look at the generate script changes to the page it already includes my changes because I added them to the page and this process simply loads the same contents. Because its already there my guess is this is why the "changes" are ignored.

Here is what I do and maybe it will help you:

  1. Save the standard aspx screen (before changes) somewhere to revert back later.
  2. Make/test your changes to the aspx page
  3. Save the modified aspx screen changes somewhere
  4. Restore the original aspx screen (saved from step 1)
  5. Go to your customization and paste in your changes to the screen > edit aspx
  6. Click Generate Customization Script

Now your changes should be in place and saved.

This doesn't apply if you are writing your own aspx as this is included as a file in your customization project. This is in reference to modifying an existing aspx file from Acumatica or another customization.

Upvotes: 3

Simon ML
Simon ML

Reputation: 1839

The Generate Customization Scripts button does a very strict validation which will sometime remove valid markup. There isn't much you can do about this.

If you are modifying custom screens, you can modify the .aspx file directly from the {WebsitePath}\CstPublished and {WebsitePath}\Pages folders.

Modifications done to files in CstPublished will be reflected instantly after refreshing the web page.

Modifications done to files from the Pages folder will updated the customization project, as you should get a conflict pop-up in the Project Editor screen.

My preferred workflow is to modify CstPublished files, test in the screen and if it works, I copy paste my change to the Pages folder.

Upvotes: 3

Related Questions