Announcements
No record found.
Hi Experts,
I have a requirement
I have 2 optionset fields resolution and satisfied in Case entity
if both fields are set to 'yes' then new_caseStatus optionsest field should be updated to Closed
Hi,
To fetch all columns use
ColumnSet = new ColumnSet(true); as you already Use.
Now if a field does not contain a value, CRM will not return it.
You can verify it using
act.Contains("columnName")
If it returns true that means the value is present, if false, that means the field is null.
how to do the contains condition. Refer docs:
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/tutorial-update-plug-in
As my suggestion you can use only that columns you need by using like this:
new ColumnSet("firstname", "lastname", "contactid"); because Retrieving all columns for an entity can have a negative impact on performance
which part of the code?
If the field you wanted to retrieve doesn't contain any value, system will not retrieve it.
Thanks Ajyendra Singh,
I"m new to technical
Can u please help me in how to write a code for this requirement
or
any reference regarding condition satisfying syntax's
After retrieve record get both value as per the below link
https://crm365blog.wordpress.com/2018/05/29/get-set-field-values-in-c-javascript-and-utility-functions/
After getting both value then check if both value is Yes through if condition (value you get from below code is that optionset value which you set when you create optionset liek for Yes (100000000) for No (10000001) which I Set for my optionset)
then after than you have to update by using
inside that if condition
Entity entIncident =
new
Entity(
"incident"
);
entIncident
[
"incidentid"
] =
Guid(
"21cb74e2-6254-e811-80dc-005056be7607"
); // put here your incidentid
entIncident[
"new_caseStatus"
OptionSetValue(0); // you have to put the value of Closed in OptionsetValue
Go to setting -> Customization -> Component->Entities->Cases-> Fields-> then select the new_caseStatus field
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
ManoVerse 128 Super User 2026 Season 1
11manish 97
Muhammad Shahzad Sh... 69 Most Valuable Professional