Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Copying values from one WO to another using SD event

Highlighted
Claire Moor
Regular Collector

Copying values from one WO to another using SD event

I'm using SD event via a business rule to create a new WO based on the one it's being created from - this all works fine. However what I'm now trying to do is copy some of the values from the existing WO into the new one. If they are straight forward fields, i.e. status, description, dates etc then they pull through fine, however I'm trying to pull through Assignment;To Workgroup but in the new WO the field is blank.

Any ideas?

Thanks
5 REPLIES
Mike Bush
Honored Contributor

Re: Copying values from one WO to another using SD event

Claire - Assignment is a bit different in the web-api, because it is a separate object you have to create one, set value and TRANSFER back to the WO, I have forgotten this more than once. Can u check?
Ganesha Sridhar
Esteemed Contributor

Re: Copying values from one WO to another using SD event

Hello,

The Assignment;To Workgroup value mapping in sd_event is same as the regular value (status)mapping.

The problem could be:
1. Field name used in Assignment;To Workgroup like in status we use "Text" same way the identify proper filed name for Assignment;To Workgroup.

2. Field Values are case-sensitive - Example : Search Code is case-sensitive so the input may not match with the OVSD Search Code values.

HTH

Regards
Ganesha Sridhara
Mike Bush
Honored Contributor

Re: Copying values from one WO to another using SD event

oops - reread your entry - it says SD_EVENT, please forget what I said! Doh!
Claire Moor
Regular Collector

Re: Copying values from one WO to another using SD event

Hi

I'm pretty sure I've defined the field name correctly. Within my business rule I've selected the fields from the list and not typed them in so it should be OK.

As for the case sensitive values - I'm not sure how I can check this. Surely if there is a value already selected in the original WO then the value is valid?

Claire
Claire Moor
Regular Collector

Re: Copying values from one WO to another using SD event

I've now got it working ONLY if the Workgroup name and searchcode are the same! Does anyone know why this is?
//Add this to "OnDomLoad" event