Hi, depending on what the user inputs for the name of a new DCR, the name may have to be updated. ie in a certain case there are no capital letters allowed in a file name.
User input: Hello
Desired save name: hello
I am using the onSaveNameSpecified handler to capture the name the user inputs, however I don't seem to be able to update the DCR name, IWDCRInfo.setDCRName is not working for me.
TeamSite 6.7.0 on Windows
function onSaveNameSpecifiedHandler (savePath) {
var parts = savePath.split('/');
var filename = parts[parts.length-1];
if (filename.toLowerCase() == "hello") {
if (filename == "hello") {
return true;
} else {
IWDCRInfo.setDCRName('hello');
alert ('input name: '+filename+' get name: '+IWDCRInfo.getDCRName());
return true;
}
} else {
// save name is not index - no validation is performed
return true;
}
alert ('Error in onSaveNameSpecifiedHandler - error with filename: '+filename);
return false;
}
If I try to save the DCR as 'Hello', the output I will get in the alert box is:
input name: Hello get name: hello
yet the DCR saves as 'Hello'.
How can I update the name the DCR will be saved as from my function?
Thank you.