This function is only supported for ServiceNow -> Cherwell migrations. Its intended use is to replace image tags within Service Now Knowledge Article HTML with the Cherwell equivalent to ensure that embedded images are correctly linked to the migrated target attachments and are displayed in the target article.
The target record and the target attachments MUST already have been migrated in a previous mapping for this function to operate correctly - all migrations involving this function must be record updates.
Param 1: STRING
Param 2: STRING
Returns: STRING
The first parameter is the HTML from the ServiceNow record, containing embedded images linked to service now attachments.
The second parameter is RecId of the target record.
The function will perform the following:
- extract the sys_id's of all attachments referenced in the html image tags
- obtain from the source server the file names of these attachments
- obtain from the target server the id's of the attachment with the same name on the target server
- replace the src attribute in the image tag to reference the target attachment
If the target record does not exist the HTML will be returned unchanged
If an attachment sys_id cannot be mapped to an attachment on the target record, a warning is reported for this record
If multiple attachments with the same file name are referenced in the source HTML, a warning will be reported for this record, since Precision Bridge will not be able to determine which target attachment to use. It will then be a manual process to correct any incorrectly referenced images.
Comments
0 comments
Please sign in to leave a comment.