Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Updating incident (case) custom attribute using CRM 4.0 SDK

$
0
0

Hello. I am trying to update a custom attribute of an incident (case): new_count using the CRM 4.0 SDK. I have the below code where I have specified the guid of the incident I want to update, but not sure what code to write to update the incident's custom attribute: 

       public static void UpdateCaseCountAttribute(Guid case_guid, int count, CrmService service)
        {
            incident incidentCase_update = new incident();

            incidentCase_update.incidentid = new Key();
// add guid of case to be updated incidentCase_update.incidentid.Value = case_guid; // writing below code to update new_count fails incidentCase_update.new_count = count; TargetUpdateIncident target = new TargetUpdateIncident(); target.Incident = incidentCase_update; UpdateRequest updateRequest = new UpdateRequest(); updateRequest.Target = target; service.Execute(updateRequest); }

How could one update an incident's custom attribute?


Viewing all articles
Browse latest Browse all 79901

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>