Question
Mobile how can we explicitly call the save function in preview page
08:08 Aug 04, 2023
Hi Community,
In Mobile, how can we explicitly call the save function in preview page. Our scenario is that we created a custom button in preview page then on click of that we will call the out of the box save function.
Like
4 comments
16:38 Aug 11, 2023
Hello,
For example in your handler you need to add:
execute: function(record) { this.callParent(arguments); record.save({ queryConfig: Ext.create("Terrasoft.QueryConfig", { isLogged: false, modelName: record.modelName }), success: function() { alert(11111); }, failure: function(exception) { console.log(exception); } }, this); this.executionEnd(true); }
If you don't pass current record as an argument in your handler - you can get it by calling this.getRecord() and use the same approach.
14:04 Jan 19, 2024
Thanks Oleg,
I am able to call this function in Record Page. Now my problem is how to force record page reload after successful save?
19:33 Jan 19, 2024
Hello,
To refresh the record page, you can use the refreshDirtyData method which is described in detail here.
05:59 Jan 22, 2024
Thank you Artem
However we found out thate
record.save function is only saving record changes. It is not saving the attachments. Any idea how to save record and attachments?
Show all comments