TIP: CM: Getting https://t.co/vy9ImpM5IL: Received fatal alert: handshake_failure? https://t.co/FgcFxmXS99… https://t.co/j6oVehMxw2
0
Using 10.1.5.1
Hello everyone,
I would like to eliminate the window that appears when an entry into an Aux Table through a Post Transition is cancelled. (See attached - "Window from webpage").
I'm not sure if there is a configuration or setting that I need to modify or if there is some JS that I can use to make that window be gone.
Any advise is welcome.
Thank you lots!
Felipe
Hello everyone,
I would like to eliminate the window that appears when an entry into an Aux Table through a Post Transition is cancelled. (See attached - "Window from webpage").
I'm not sure if there is a configuration or setting that I need to modify or if there is some JS that I can use to make that window be gone.
Any advise is welcome.
Thank you lots!
Felipe
Accepted Answer
0
Hi Lynn,
After several hours of playing around with this issue, I manage to resolve it. Here is the code:
Feel free to use it and if you do and run into issues let me know.
There are probably better/cleaner ways to do it. But this is currently working.
Sincerely,
Felipe
After several hours of playing around with this issue, I manage to resolve it. Here is the code:
/*************************************************************
The code below attempts to eliminate the message window displayed when the Cancel action is performed on a Post transition edit form.
Note: This was developed in version 10.1.5.1.
By Felipe Mansilla for Serena Software users and js enthusiasts.
**************************************************************/
function HandlePostCancelButton(){
//search location of script
//the script is enclosed in a frame - id = 'frame_buttons' > head
var scriptElement = parent.document.childNodes[0].childNodes[2].childNodes[0].contentDocument.getElementsByTagName( 'script' );
//loop through all the scripts in the frame
for( var i = 0; i < scriptElement.length; i++ ){
var scriptSelected = scriptElement[i];
var scriptCode = scriptElement[i].innerHTML; //extract code with in <script> tag
//snip of code that triggers the message
var sCode = "\n\t\t\t\t\t\tif (id == 2 && bPost) {\n\t\t\t\t\t\t\tvar yes = confirm(\"The original item has already been transitioned.\\n Are you sure you want to cancel?\\n Click OK to cancel the Post operation.\\n Click Cancel to continue the Post operation.\");\n\t\t\t\t\t\t\t\tif (yes)\n\t\t\t\t\t\t\t\t\tbSuccess = parent.view.goSubmit(id, bPost);\n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\tbSuccess = false;\n\t\t\t\t\t\t}";
//look for code snip in the <script> content
var bFound = scriptCode.indexOf( sCode );
if( bFound !== -1 ){
//get parent of node
//this is important as we will need to insert the code in the same section
var scripParent = scriptElement[i].parentNode;
//code to replace the window message
var sReplace = "\n\t\t\t\t\t\tif (id == 2 && bPost) {\n\t\t\t\t\t\t\tbSuccess = parent.view.goSubmit(id, bPost);\n\t\t\t\t\t\t}";
//results stores our new script code
var result = scriptCode.replace( sCode, sReplace );
//remove script from document
$( scriptElement[i] ).remove();
//create new script element
var eNewScript = document.createElement( "script" );
eNewScript.type = "text/javascript";
//attach our new code to new script element
eNewScript.innerHTML = result;
//add new script element from where it was removed
scripParent.appendChild( eNewScript );
}
}
}
AddLoadCallback( HandlePostCancelButton );
Feel free to use it and if you do and run into issues let me know.
There are probably better/cleaner ways to do it. But this is currently working.
Sincerely,
Felipe
-
Lynn Mattiemore than a month agoSorry, I didn't think it would be quite that difficult. Did you enter the enhancement idea?
Responses (4)
-
Accepted Answer
0I would love to see an enhancement that allows the workflow designer to set an option not to display that message on each post/subtask transition. It is important for some of them, but not important at all for others. If you enter this as an Idea, I would definitely vote for it.
In the short term, you could probably change the Cancel button to do something else other than a real Cancel. Maybe you could just redirect back to the original item. -
Accepted Answer
0Hi Lynn,
Thank you for your response. I'll make sure it gets entered as an idea. Your suggestion is good, and I actually have a similar behavior for a custom 'Return' button on the form.
Nonetheless, and I guess I neglected to mentioned this, the issue also seems to present it self when accessing a record on an embedded within the Post transition form (when using Work Center).
For some reason, the message seems to load with the initial call of the page. So, when using the 'X' to close the window or accessing a record on the embedded report. The window closes and the message gets triggered.
Any thoughts on how to resolve this is also welcome. -
Accepted Answer
-
Accepted Answer
0Idea added:
Link to Idea
This is my first idea entered. Let me know if you see anything wrong with what I said.
Thank you Lynn.Like Lynn Mattie likes this post.
Your Reply

Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »