ContributionsMost RecentMost LikesSolutionsRe: automatically edit record after copyMasterDetailOne thing I did not take into account is the way XML uses the text, The following function was added and each text node was wrapped in the function. function escapeXml(unsafe) { return unsafe.replace(/[<>&'"]/g, function (c) { switch (c) { case '<': return '<'; case '>': return '>'; case '&': return '&'; case '\'': return '''; case '"': return '"'; } }); } And for clarification on why I have such a round about way is because we have looping relationshipson the tables involved and the manager only wanted specific fields copied instead of all of them.