Service Desk Practitioners Forum
cancel

Copy custom field from SC to Incident

SOLVED
Go to solution
Highlighted
danillu
Valued Contributor.

Copy custom field from SC to Incident

Hi all,

In Service Desk 4.5 SP18 I have created a button in a Service Call form that opens an Incident form (to relate a SC with an Incident). I need that SD copy the value of some field from SC to Incident. With the option “Copy fields” of the Administrator Console I can copy default fields of diferent modules (SC and Incident), but I need copy custom fields. Does anybody know anyway to do it?
7 REPLIES
George M. Meneg
Acclaimed Contributor.

Re: Copy custom field from SC to Incident

Hello danillu,

You can copy fields between service call and incident provided that they have the same name and they are of the same type. If the field is code type and not a generic code, then you must ensure that service call;code and incident;code have the same value list.

You cannot copy a 64K field.
menes fhtagn
George M. Meneg
Acclaimed Contributor.

Re: Copy custom field from SC to Incident

And there is an alternatice. Instead of using "Create incident;copy fields from service call" you can create a smart action that will launch sd_dataform. There you can pass any value you like (with the exception of 64k field)
menes fhtagn
Michael Daly_2
Super Contributor.
Solution

Re: Copy custom field from SC to Incident

Hi Danillu

I recently had a similar problem trying to copy a custom field called 'Customer' (which is an Organisation reference field) from a Service Call to a Change.

Go to Administrator Console -> Business Logic -> Actions -> Smart Actions -> Service Call. In the form for creating a new Smart Action I have 'SD_Dataform'in the Application field. In the Parameters field I have:
"Change Request (CR) Form" +"relations.service call.id=[ID]" +"relations.relation type.text=Solved by" +"Config Item=[Config Item]" +"Customer.name=[Customer;Name]" +"Billing Ref:=[Billing Ref:]" +"Customer Ref:=[Customer Ref:]" +"Brief Description=[Brief Description]" +"Requestor.name=[Caller;Name / Number]" +"Planned Start=[Planned Start]" +"Planned Finish=[Planned Finish]" -ForceNew

The above creates a new Change as well as the 'relation-type' between the Service Call and the Change. Thus you see the new Change form as well as the 'Relation-type' form with the "Solved By" in the 'Type' field. You still have to click the [Okay] button to accept the relation-type (or glue) between the Service Call and the Change.

To execute from a Service Call choose the menu item 'Actions'. From the drop-down list in the group of Smart Actions I have the above Smart Action called 'Create a new Change (copying data from SC to Change)'. This creates a new Change form with a number of fields being copied as shown above, including my custom field called 'Customer'.

I tried to use the 'Copy fields' feature because I have created a 'Customer' field in Service Calls, Changes and Work Orders which has exactly the same spelling and field type, but the Copy fields feature didn't work. Using a Smart Action and SD)Dataform works very well.

Good luck and don't hesitate to ask if you need more clarification.

Regards

Michael Daly
21 March 2007
danillu
Valued Contributor.

Re: Copy custom field from SC to Incident

Hi all,

Thanks to respond quickly, your solution works perfectly.

However, now I have three new problems with sd_dataform.bat, maybe you can help me:

- I have seen that the 'Parameters' field of the Smart Action (sd_dataform) has a limit of 450 characters, but I need copy more fields that don't fit in this field. Could I do anything to solve it? (You can see attachment)

- Some fields that I need to copy of Incident are checkbox field but I've seen that sd_dataform doesn't copy the value. Is it a limitation of dataform?

- The fields `Asignment.To Person' and `Asignment.To workgroup' are copied correctly, but when sd_dataform is executed it open three windows: the new form, a window with the relation of the SC-Incident and a 'Assignment' window (Person and Workgroup), I would like that this window doesn't appear but I don't know how could I do it... (To see attachment)

Regards,

Dani
George M. Meneg
Acclaimed Contributor.

Re: Copy custom field from SC to Incident

Hello,

About the 450 characters, there is an ugly workaround. But I suggest to consider sd_import if too many fields are required to be copied.

The workaround is to use a 4k field and have it filled like the 'Parameters' field of the smart action. However, have in mind that you must pass the values and not field names inside brackets.

For example if your parameter was +"Information=[Information]" you must substitute [Information[ with the actual content of the Information field. Thus you must make sure that the values you want to pass don't exceed the 4k limit.

About checkbox fields, booleans can be passed like any field. There is no problem with sd_dataform.

About your third question, you can't suppress the Relations window. However try to rearrange your fields, chances are that assignment to;person is passed before assignment;to workgroup even if on your parameter definition to;person is second.

However, as I wrote above, if you need to copy a large number of fields, consider it doing with sd_event or sd_import.
menes fhtagn
Michael Daly_2
Super Contributor.

Re: Copy custom field from SC to Incident

Hi Danillu

My Spanish is not too good but regarding the 3rd point about the 'Assignment.To' form that appears - in your parameters field of the Smart Action should it be '+Assignacio.A grup de treball=[Assignment;To workgroup;Serach code]' or should it be '+Assignacio.A grup de treball=[Assignment;To workgroup] without the "Search code". Also with the '+Assignacio.Apersona=[Assignment;To person;Search code]' should it be without the "Search code" to be '+Assignacio.Apersona=[Assignment;To person]'?

Does having the "Search code" in these fields bring up this extra unwanted 'Nou - Assignacio' form? In fact a lot of characters are used up by many of your fields having the additional parameter of "Search code" in them when I don't think you need this. Maybe one of the SD wizards can find an answer???

I hope this helps.

Michael
danillu
Valued Contributor.

Re: Copy custom field from SC to Incident

Hi,

Thanks for your answers. I would like try to do what I need but using 'sd_import' instead of 'sd_dataform', it would be possible? I have looked for information about 'sd_import' but I don't know how to do it using 'sd_import'.

Regards,

Dani