I want to know, is that possible that we can track whether the sublist button user has pressed is Add/Insert/Delete, after populating all of the mandatory sublist fields, under sublistChanged
entry point of client script 2.0. (For e.g.):
/**
*@NApiVersion 2.0
*@NScriptType ClientScript
*/
define([], function() {
function sublistChanged(c) {
if(c.mode == "add"){
//Some Code
}
else if(c.mode == "insert"){
//Some Code
}
else if(c.mode == "delete"){
//Some Code
}
}
return {
sublistChanged: sublistChanged
}
});
Thanks in advance.
As Brian said in a comment, the API provides three other entry points that trigger for those cases:
validateLine
for line additionsvalidateInsert
for line insertionsvalidateDelete
for line deletionsThese each require a boolean return value to allow or deny the operation.