Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Activate button in custom entity provides save mode 1 instead of 6

Posted on by Microsoft Employee

Hi All,

I encountered an unusual bug when I was debugging some JavaScript and realized that a custom entity which is related to contacts, gives a save mode of 1 (Standard save) instead of 6 (Reactivation). I tested this in the contacts entity and no problems were found, it gives a save mode of 6 when I reactivate it.

Currently using Microsoft CRM 2016.

I am using the following code:

function alertSaveMode(execObj) {

 var savemode = execObj.getEventArgs().getSaveMode();

 alert(savemode);

}

It seems to affect only custom entities. I would gladly appreciate some insight on this or if anyone else has had this problem before?

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Activate button in custom entity provides save mode 1 instead of 6

    Hi All,

    Eventually we ran tests directly from the on-premise server and even checked the settings and ribbons (line by line). There were no differences from the working CRM and the CRM giving us the same save mode.

    Eventually we just used used Javascript and ribbon workbench to manipulate the behaviour.

    Thanks for your time,

    Sincerely,

    Robert.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Activate button in custom entity provides save mode 1 instead of 6

    Oh I see that your version is Dynamics 365. I am currently in CRM 2016. Would that cause it to be any different?

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Activate button in custom entity provides save mode 1 instead of 6

    Hi,

    I tried this on a custom entity and it returned 6.

    savemode.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Activate button in custom entity provides save mode 1 instead of 6

    Hi,

    I attempted in a clean organization version 8.0.0.1094 with contacts and a custom entity and it did not work.

    Did you press "Activate" on the custom entity or on contacts?

    If you press "Activate" on contacts, it works as expected. Although, when you press "Activate" on the custom entity, you will get the save mode 1 instead of 6.

    Appreciate your help and input,

    Thanks!

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Activate button in custom entity provides save mode 1 instead of 6

    Hi rleantong,

    I just tried your code on Account & custom entity on my CRM Online trial instance and it worked as expected.

    If in your environment is not working then there is a possibility that it was a bug in your version and now it is fixed in the latest update [or some other update after yours]

    Just to confirm that that no other code is causing this, i would suggest you to remove any other script and then try the code again on a different custom entity.

    Hope this helps

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans