function setOriginalText(layer, text) {
  // get data dictionary
  let dataDict = getDataDictionary(layer)

  // save new text as the original text in metadata
  dataDict.setValue_forKey(text, 'originalText')

  // LEGACY: remove any old values stored in the dictionary
  dataDict.removeObjectForKey('textWithPlaceholders')

  // set new data dictionary
  setDataDictionary(layer, dataDict)
}
Sets the original text as metadata on the layer.

@param {MSLayer} layer
@param {String} text