Save functionality not override

I have try to override the save functionality. But, it is not working. Even the 1st console is not working. I have added bindTo in click event in ViewConfigDiff. Pls help with that.

Like 0

Like

2 comments
Best reply

Hello, 

You seem to be mixing things between classic pages and Freedom UI pages. The page you're customizing appears to be a Freedom UI page, which does not support adding methods. The code you've added would work for classic pages, but not on Freedom UI pages. 

Instead, this is done via request handlers on Freedom UI pages. See this link for overriding the save request on a Freedom UI page: https://customerfx.com/article/adding-code-to-the-save-event-of-a-creatio-freedom-ui-page/

Ryan

Hello, 

You seem to be mixing things between classic pages and Freedom UI pages. The page you're customizing appears to be a Freedom UI page, which does not support adding methods. The code you've added would work for classic pages, but not on Freedom UI pages. 

Instead, this is done via request handlers on Freedom UI pages. See this link for overriding the save request on a Freedom UI page: https://customerfx.com/article/adding-code-to-the-save-event-of-a-creatio-freedom-ui-page/

Ryan

Also, as a side note, the code you have in the getActiveCount won't work since ESQ is asynchronous (so the return will happen before the query returns any results), additionally, the results of the query of an ESQ are passed in via a callback function passed as a parameter to getEntityCollection, not returned as a result of calling getEntityCollection.

For a Freedom UI page, I'd use a model load instead of the ESQ since you can await the result, rather than use a callback function. See https://customerfx.com/article/querying-data-using-filter-conditions-via-the-model-class-equivalent-to-enityschemaquery-in-a-creatio-freedom-ui-page/

Ryan

Show all comments