web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Deactivated record is reactivating after opening

(0) ShareShare
ReportReport
Posted on by 3,070

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

*This post is locked for comments

I have the same question (0)
  • Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    how about plugin? have you check that?

  • antc Profile Picture
    2,909 on at

    What do you see in advanced find prior to opening back up.

    Check any background process and enable audit.

  • Abby Kong Profile Picture
    6 on at

    I don't think this script wouldn cause that.

    When you open up the form again, does it show if there is any unsaved change?

    Do you have any plugin on this entity?

    Also, if you have audit history turned on for this entity. It might be a good place to check when the record is activated again and by which user.

  • Ryan Maclean Profile Picture
    3,070 on at

    hey guys,

    thanks for your responses.  There are no plugins registered on this entity, and there are no background workflows which would reactivate the record.

    I have enabled audit history, however it just shows that the active user has reactivated the record.  I'm pretty stumped as to what is causing this problem

    Ryan

  • antc Profile Picture
    2,909 on at

    What does advanced find show as the status of a deactivated record before being reopened?

  • Ryan Maclean Profile Picture
    3,070 on at

    The record is shown as inactive, then when it is opened after a few seconds it activates

  • antc Profile Picture
    2,909 on at

    Is Status Reason normal or does it have added options for either state?

  • Ryan Maclean Profile Picture
    3,070 on at

    The status reason has 1 option for Active, and 3 options for inactive.  I've tried all 3 options and the same thing happens

  • Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    do you have any js associated with the ribbon button?

  • Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    It might be possible that plugins, workflows and Web API running on other entities are the culprit of this behaviour.

    Could you please deactivate all your custom plugins and workflows from your CRM instance and try?

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans