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)

Weird results from a Bool value

(0) ShareShare
ReportReport
Posted on by 25

Okay. I can work with this. But I'm really wanting to understand what is happening, because I've never had it happen this way before.

I created a standard two option field in Dynamics 2011.

When coding the plugin I'm getting the reverse value of what I'm expecting.

Here is the code:
            bool trigger = preImageEntity.GetAttributeValue<bool>("trigger");
When Yes is marked on the form, it comes back as False.
When No is marked on the form, it comes back as True.

I double checked the Options. Yes = 1 and No = 0.

Like I said, I can work with this, I'm just wondering why it's not returning the values I'm expecting.
I'm expecting Yes = True and No = False.

Thanks.


*This post is locked for comments

I have the same question (0)
  • Verified answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    If I understand this correctly, you are retrieving value from PreImage. That means value stored in Database before change in UI.

    The current value from UI will be in Target entity.

  • Iamoop Profile Picture
    25 on at

    Thank you!

    That makes perfect sense and can't believe I missed it. Appreciate it.

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