Forum Discussion
As far as I understand your post, you are already able to lock your items. Your main problem is the refresh. Have you tried parent.onRefresh() at the end of your JS codE?
I had, and it hadn't worked, but I was ultimately able to resolve this by setting a timeout on the command, that only allows it to run once the Relationships are fully loaded. Thank you for the assistance.
setTimeout(refreshForm, 10);
function refreshForm()
{
if (!isTabbarReady()){
setTimeout(refreshForm, 10);
return;
}
parent.onRefresh();
}
{
var res = Boolean(parent &&
parent.relationships &&
parent.relationships.document &&
parent.relationships.document.readyState == "complete" &&
parent.relationships.relTabbar &&
top &&
top.menuFrame &&
top.menuFrame.activeToolbar);
return res;
}