I created custom feilds in the SLA with as Number type named "Incident A" and "Incident B" So whenever I open a case (Service Call) that is a type of Incident A I need to decrement the counter in the SLA feild.
You CANNOT do this through db rules on service calls/incidents unless the db/ui rules is calling an external script (preferably web-api) that will update the related SLA.
The other approach is to use "service" as an intermediate providing that there is each service has at most one related SLA. In that case when a service call's SLA is not empty then update a custom service boolean.
This will trigger a db rule on services to update related sla's custom field (that's why you need only one SLA per service).
Have in mind that this won't work on SP22 without a specific hotfix (I don't recall the ITSM document)
Again you can't take an action to update any feild in the Service when A service call is created. The Service Call related Items doesn't include SLA neither Services. And accordnilgy I can update the SLA Data.
What do you think? If you have such a script to do that I will be so greateful. Thanks in advance
There is a confusion. The "Select a related item" on the db rules is for one to many relations and not for 1 to 1 relations. So, you won't find service in related items. Instead you gonna find service in Fields menu.
Using that you can update a service boolean field.
A db rule will be triggered and in a Service DB rule you will be able to select SLA on related items since the relation between service and sla is one to many. And this is why using this method IS NOT ADVISED, because if service is linked to more than one SLA, then ALL the SLAs will be updated.
As for the script, I don't have such a script. However using WEBAPI you could do almost anything. Knowledge of java and good knowledge of OVSD is required.
I can't get still how to update a Service Feild triggering a Service Call condition. Can you give me an example exactly describing what you mean? Thanks for your advice, however, One Service os only linked to one SLA. thanks
Dear George, I managed to do what I wanted. But I want to do another thing.
In case the feilds are Date type. I created Feild Duration1 as custom in service call.
And when I consume this duration, I add the time to custom Date time in service and set a boolean to true. Now when I want to Subtract the time consumed between the SLA and Service using a Service DB Rule, the custom Date time in SLA is not displayed.
Hi I to do next: create db rule with condition by type. Then rule must run the script, I used the Java, but in My case I'm increment or decriment a spend time and summaru in SLA. The script is attached, use as example.