Hi, guys! Can anybody help me, please.
In my company, we use Case entity, and Service Activities regarding to case. When we save Service Activities, we want just to save them (and not Mark complete!), and in that moment, they must be in status Active. We use button Save for that.
Ok, but now, the problem is, because we have dialog for resolving case, and in that moment, when case is resolved, we want ALL service activites to change status (statuscode) to complete.
So, I was wondering if it's possible to add fetchxml to do foreach looping for that case and SET statuses for service activities to complite? I don't know if fetchxml can only filter data, or it can also SET values?
I've written fetchxml for filtering, but now I don't now how to add foreach loop for setting values and is that even posible?
If it's not possible, can you please tell me another way of doing that. I must implement it in dialog!
Here is my query:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="activitypointer">
<attribute name="activitytypecode" />
<attribute name="subject" />
<attribute name="statecode" />
<attribute name="prioritycode" />
<attribute name="modifiedon" />
<attribute name="activityid" />
<attribute name="instancetypecode" />
<attribute name="community" />
<order attribute="modifiedon" descending="false" />
<filter type="and">
<condition attribute="activitytypecode" operator="in">
<value>4214</value>
</condition>
<condition attribute="statecode" operator="ne" value="Variable1" />
</filter>
<link-entity name="incident" from="incidentid" to="regardingobjectid" alias="bd">
<filter type="and">
<condition attribute="ticketnumber" operator="eq" value="Variable2" />
</filter>
</link-entity>
</entity>
</fetch>