Page 1 of 1

Switching partial save flag programmatically

Posted: December 9th, 2016, 11:37 am
by alex_izm
Dear CSPro team,

The static "PartialSave" flag is set in the .ENT file of the entry application. Is there a way to switch this flag programmatically from within the application code? I know it is possible to save a case using partialsave() function, but I would like to have the option of running the application with either enabled or disabled partial save, without having to maintain two separate .ENT files.

Thanks!

Re: Switching partial save flag programmatically

Posted: December 9th, 2016, 1:42 pm
by josh
There is no way to set that flag programmatically. You could always disable it and then in logic add a userbar button that calls the partialsave() function. You could only add this userbar button when you want to allow partial save.

Re: Switching partial save flag programmatically

Posted: December 9th, 2016, 5:12 pm
by alex_izm
josh wrote:You could always disable it and then in logic add a userbar button that calls the partialsave() function. You could only add this userbar button when you want to allow partial save.
Aha, this is very clever. Thank you!

I guess the only thing you lose is that "Partial save" button when you "X" out of the CSEntry window. But this is not that big of a loss. Your solution would work in my case.

Re: Switching partial save flag programmatically

Posted: December 10th, 2016, 8:02 am
by josh
You can also emulate the partial save on Window close option by using a custom onstop() function. However doing that adds another complication. When restoring from partial save you don't get the "go last position" dialog. There is a workaround for that too though which is described in the help for OnStop().