When i delete a service from automation script by passing the service id, there is resources (under apps-->Resources) as in the pic, it is not reflected. So after deleting when i try to create a service with the same name it says it already exists.
Is there a way to reflect the deletion and creation of services in this area.Capture.PNG
![](https://community.dataminer.services/wp-content/uploads/wp-user-manager-uploads/2020/10/nomnom.jpg)
Hi Hari,
I see that this question has been inactive for some time. Do you still need help with this? If not, could you select the most relevant answer (this can be your own answer) to indicate that the question is resolved?
Hi Hari,
The picture shows me that you are referencing to resources/resourcepools.
Services are not directly linked to those, but maybe it is good to explain a bit more what you trying to achieve with the code you using in the script.
If you have a service, can you verify if the "m_Resourcemanagement.Sections.ResourcePoolInternalProperties.Id" is the DataMiner Id of where the service is located?
Hi Dias,
I'm not getting any exception but it is not proceeding after deleting the service.
Please find the code for deletion and creation of service below, i'm deleting the service using service id and creating a service using the same name.
_serviceHelper.DeleteService(domPoolResource.GetFieldValue<string>(Im_Resourcemanagement.Sections.ResourcePoolInternalProperties.Id, Im_Resourcemanagement.Sections.ResourcePoolInternalProperties.Service_Id).Value);
Task.Delay(10000);
var serviceId = _serviceHelper.CreateService(poolName + "abd", new List<ServiceInfoParams>(), ViewActiveName);
Hi Hari,
As Thomas mentioned, can you please double check that you are passing the correct DmaID and ServiceID to the method? Those should be two integer values. In cube, if you right click on the service and you go to Properties you should see those values.
Hi Hari,
Can you try to re-upload the image as it’s no longer available?
Can you also share the code that you are using to delete the service? You don’t get any error/exception when doing the deletion?