SM to RC field Mapping, syntax tip

by Community Manager on ‎10-21-2013 01:23 PM

This does not appear to be mentioned anywhere in the RC documentation. You’ll enjoy hours, even days, of troubleshooting if you don’t map using this format.

 

Background

 

When mapping custom fields from Service Manager to Release Control, first add them to the extaccess record (example is from a tailored record: object=ChangeRC)

External Access Record

 

Next, generate a new WSDL stub for RC (it’s in the RC docs)

Then update the convertChange.js and/or the convertTask.js scripts to map the new data. For example:

 

   generic_rfc.setField("contact-phone", sm_rfc.get("header.coordinatorPhone"));

   generic_rfc.setField("category", sm_rfc.get("header.category"));

   generic_rfc.setField("subcategory", sm_rfc.get("header.subcategory"));

   generic_rfc.setField("emergency", sm_rfc.get("emergency"));

 

// CUSTOMIZATION: Custom Field Mappings

   generic_rfc.setField("bpd-environment", sm_rfc.get("environment"));   

   generic_rfc.setField("bpd-is-exception", sm_rfc.get("isException"));

   generic_rfc.setField("bpd-exception-reason", sm_rfc.get("exceptionReason"))

 

 

Field Mapping in Release Control

 

When referencing an SM field in a Release Control field mapping, notice how the field is defined:

      structure,fieldCaption  

 

When referencing the SM Field by the caption name, you need to do the following:

  • If the field is in a parent structure, you must include the structure in the field name in the conversion script.
  • You must write the field caption name in lowerCamelCase, even if it shows as UpperCamelCase in the extaccess record.

 

Sample SM Map

   sm_rfc.get("header.changeNumber")

Note that it is not mapped as header,ChangeNumber (the caption in the extaccess record) nor is it changeNumber (with no structure) nor is the actual field name (header,number).

 

  • If the field is not in a dbdict structure, you still need to convert the caption to lowerCamelCase.

More Sample Mappings

 

   sm_rfc.get("environment")  

    environment, not Environment 

   sm_rfc.get("isException")

    isException, not IsException

   sm_rfc.get("exceptionReason")

    exceptionReason, not ExceptionReason

 

 

Search
Follow Us


Contributors
HP Blog

IT Service Management Blog

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation