Question

Save button doesnt work on editing the source code for form pages

Hi,



I added my code under Handlers (simple code to pop the dialog box on button click)and then saved. Also, I made sure that I've saved my form page. I don't see any changes on clicking the button. I then went back and checked the code and found that the code added under the handlers is missing. It is not able to save. I've cleared cache, restarted the system and tried multiple times but no luck. Please, someone help me understand why my application is not able to save the code changes?

Here's the code:

 

handlers: /**SCHEMA_HANDLERS*/[
			{
				request: "usr.MyButtonRequest",
				/* Implementation of the custom query handler. */
				handler: async (request, next) => {
					this.console.log("Button works...");
					Terrasoft.showInformation("My button was pressed.");
					var price = await request.$context.NumberAttribute_i0db7bz;
					this.console.log("Price = " + price);
					/* Call the next handler if it exists and return its result. */
					return next?.handle(request);
				}
			}
		]/**SCHEMA_HANDLERS*/,



Also, I've updated my method name under the button declaration in viewConfigDiff.



"clicked": {

                        "request": "usr.MyButtonRequest"

                    },

Thanks.

Like 0

Like

2 comments
Best reply

Hello Jahnavi,



Based on the information you provided, it appears that you are saving changes to the source code and then saving them to the form page without reloading the page or clearing the cache. As a result, the page is being saved before the changes are made in the source code. To solve the problem, try saving only the source code page.

I've managed to work it out. But, the code changes were saved only if I modified the code using "Configuration"--->My package-->find the form page and click on the open source button-->update code and click on save.

Hello Jahnavi,



Based on the information you provided, it appears that you are saving changes to the source code and then saving them to the form page without reloading the page or clearing the cache. As a result, the page is being saved before the changes are made in the source code. To solve the problem, try saving only the source code page.

Show all comments