Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Validate if Active or Inactive

(0) ShareShare
ReportReport
Posted on by 105

Hi, I am working on a task in CRM and still learning.
The task is: We add training plans to users in CRM. If a step in training plan is deactivated (its status is inactive), we shouldn't be able to allocate that step.

So basically, 

625347.Untitled.png

here before Values I have to check if step field is active or inactive. How do i do that?

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Validate if Active or Inactive

    Hi,

    The following code example shows how to use the ConditionExpression class to test for the inactive state.

    ConditionExpression condition3 = new ConditionExpression();  

    condition3.AttributeName = "statecode";  

    condition3.Operator = ConditionOperator.Equal;  

    condition3.Values.Add(AccountState.Active);

    Thanks,

    Arshad

    Please like and subscribe my YouTube Channel and follow my blog for latest interview question and answer.

    www.youtube.com/.../videos

    juniorcrmblog.blogspot.com/

    juniorazurecrm.blogspot.com/

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 99

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans