Validation on document before to save in Arbortext Editor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Validation on document before to save in Arbortext Editor.
I'm adding a callback on the Save option in the Arbortext Editor menu.
The callback works perfectly but I don't know how to prevent the save from being made in a particular case.
Here is my addition of the callback :
doc_add_callback(current_doc(), 'save', 'triggerSaveDocument');
Here is my implementation of that callback :
function triggerSaveDocument(doc, op){
local isValidDocument = callComparaison();
if(!$isValidDocument){
#I need here to prevent the save process of being made.
return 0;
}
}
I tried return 0; but that didn't work.
Do you know how to bypass the saving ?
Thanks for your time.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My memory is quite hazy here but in the help documentation it seems to indicate you should return -1? Does that work?
https://support.ptc.com/help/arbortext/r8.2.1.0/en/index.html#page/Program/acl_ref/help762.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My memory is quite hazy here but in the help documentation it seems to indicate you should return -1? Does that work?
https://support.ptc.com/help/arbortext/r8.2.1.0/en/index.html#page/Program/acl_ref/help762.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It does thanks a lot !