Hi guys,
I have a really odd situation. When I deactivate a record in a custom entity, then open the record again to view it, it reactivates. I'm at a loss to work out what is causing this to happen, and there are no field changes or workflows or running that may cause it.
The only thing I can think that might be causing it is a javascript library on the form that is used to show/hide a tab, see below:
function ShowHideFollowUp(){
var followup = Xrm.Page.getAttribute("hr_followuprequired").getValue();
if(followup != null){
if(followup == 1){
Xrm.Page.ui.tabs.get("Follow-up_TAB").setVisible(true);
}
else{
Xrm.Page.ui.tabs.get("Follow-up_TAB").setVisible(false);
}
}else
{
Xrm.Page.ui.tabs.get("Follow-up_TAB").setVisible(false);
}
}
This function triggered on form load, could this be causing the issue? If so, how can I fix it? If not, has anyone got any other advice?
Thanks,
Ryan