<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Email field not copying from Interaction to Case in CSM forum</title>
    <link>https://www.servicenow.com/community/csm-forum/email-field-not-copying-from-interaction-to-case/m-p/3288290#M43395</link>
    <description>&lt;P&gt;When creating a case from an interaction I need to copy the email address to the case but it is not copying.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code for the UI Action:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;current.update();

var newRecord = new GlideRecord("sn_customerservice_chat");
newRecord.initialize();


if (!gs.nil(current.account))
    newRecord.setValue("account", current.getValue("account"));

if (!gs.nil(current.contact))
    newRecord.setValue("contact", current.getValue("contact"));

if (!gs.nil(current.consumer))
    newRecord.setValue("consumer", current.getValue("consumer"));


newRecord.setValue("short_description", 'Case created from Interaction -['+current.getValue('number')+']');
newRecord.setValue("description", current.getValue("transcript"));
newRecord.setValue("assignment_group", gs.getProperty('rebode_chat_assignment_group'));
newRecord.setValue("assigned_to", gs.getUserID());
newRecord.setValue("state", 10);
newRecord.setValue("u_contact_email", current.getValue('consumer.email'));

if (GlidePluginManager.isActive('com.snc.csm_proxy_contacts') &amp;amp;&amp;amp; !gs.nil(current.opened_for) &amp;amp;&amp;amp;
    current.opened_for.sys_class_name == "sys_user" &amp;amp;&amp;amp; new sn_csm_proxy_cont.ProxyContactHelper().isUserProxyContact(current.getValue("opened_for")))
    newRecord.setValue("internal_contact", current.getValue("opened_for"));

if (current.getValue('type') == 'phone')
    newRecord.setValue('contact_type', 'phone');
if (current.getValue('type') == 'chat')
    newRecord.setValue('contact_type', 'chat');


action.openGlideRecord(newRecord);

// Tracks number of "Create Case" clicks on the Interaction form via CSM Agent Workspace
var csmWorkspaceUAUtil = new sn_csm_workspace.CSMWorkspaceUAUtil();
csmWorkspaceUAUtil.createCaseClickInteraction();

intRelUtil = new global.InteractionRelationshipUtil();
if (intRelUtil.copyAttachments !== undefined)
	intRelUtil.copyAttachments(current, newRecord);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This is the line of code that is not working:&amp;nbsp;&lt;/P&gt;&lt;P&gt;newRecord.setValue("u_contact_email", current.getValue('consumer.email'));&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jun 2025 20:33:01 GMT</pubDate>
    <dc:creator>ronyates</dc:creator>
    <dc:date>2025-06-12T20:33:01Z</dc:date>
    <item>
      <title>Email field not copying from Interaction to Case</title>
      <link>https://www.servicenow.com/community/csm-forum/email-field-not-copying-from-interaction-to-case/m-p/3288290#M43395</link>
      <description>&lt;P&gt;When creating a case from an interaction I need to copy the email address to the case but it is not copying.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code for the UI Action:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;current.update();

var newRecord = new GlideRecord("sn_customerservice_chat");
newRecord.initialize();


if (!gs.nil(current.account))
    newRecord.setValue("account", current.getValue("account"));

if (!gs.nil(current.contact))
    newRecord.setValue("contact", current.getValue("contact"));

if (!gs.nil(current.consumer))
    newRecord.setValue("consumer", current.getValue("consumer"));


newRecord.setValue("short_description", 'Case created from Interaction -['+current.getValue('number')+']');
newRecord.setValue("description", current.getValue("transcript"));
newRecord.setValue("assignment_group", gs.getProperty('rebode_chat_assignment_group'));
newRecord.setValue("assigned_to", gs.getUserID());
newRecord.setValue("state", 10);
newRecord.setValue("u_contact_email", current.getValue('consumer.email'));

if (GlidePluginManager.isActive('com.snc.csm_proxy_contacts') &amp;amp;&amp;amp; !gs.nil(current.opened_for) &amp;amp;&amp;amp;
    current.opened_for.sys_class_name == "sys_user" &amp;amp;&amp;amp; new sn_csm_proxy_cont.ProxyContactHelper().isUserProxyContact(current.getValue("opened_for")))
    newRecord.setValue("internal_contact", current.getValue("opened_for"));

if (current.getValue('type') == 'phone')
    newRecord.setValue('contact_type', 'phone');
if (current.getValue('type') == 'chat')
    newRecord.setValue('contact_type', 'chat');


action.openGlideRecord(newRecord);

// Tracks number of "Create Case" clicks on the Interaction form via CSM Agent Workspace
var csmWorkspaceUAUtil = new sn_csm_workspace.CSMWorkspaceUAUtil();
csmWorkspaceUAUtil.createCaseClickInteraction();

intRelUtil = new global.InteractionRelationshipUtil();
if (intRelUtil.copyAttachments !== undefined)
	intRelUtil.copyAttachments(current, newRecord);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This is the line of code that is not working:&amp;nbsp;&lt;/P&gt;&lt;P&gt;newRecord.setValue("u_contact_email", current.getValue('consumer.email'));&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2025 20:33:01 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/email-field-not-copying-from-interaction-to-case/m-p/3288290#M43395</guid>
      <dc:creator>ronyates</dc:creator>
      <dc:date>2025-06-12T20:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Email field not copying from Interaction to Case</title>
      <link>https://www.servicenow.com/community/csm-forum/email-field-not-copying-from-interaction-to-case/m-p/3288371#M43396</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/186072"&gt;@ronyates&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;try this script&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;current.update();

var newRecord = new GlideRecord("sn_customerservice_chat");
newRecord.initialize();


if (!gs.nil(current.account))
    newRecord.setValue("account", current.getValue("account"));

if (!gs.nil(current.contact))
    newRecord.setValue("contact", current.getValue("contact"));

if (!gs.nil(current.consumer))
    newRecord.setValue("consumer", current.getValue("consumer"));


newRecord.setValue("short_description", 'Case created from Interaction -['+current.getValue('number')+']');
newRecord.setValue("description", current.getValue("transcript"));
newRecord.setValue("assignment_group", gs.getProperty('rebode_chat_assignment_group'));
newRecord.setValue("assigned_to", gs.getUserID());
newRecord.setValue("state", 10);
newRecord.setValue("u_contact_email", current.getElement('consumer.email'));

if (GlidePluginManager.isActive('com.snc.csm_proxy_contacts') &amp;amp;&amp;amp; !gs.nil(current.opened_for) &amp;amp;&amp;amp;
    current.opened_for.sys_class_name == "sys_user" &amp;amp;&amp;amp; new sn_csm_proxy_cont.ProxyContactHelper().isUserProxyContact(current.getValue("opened_for")))
    newRecord.setValue("internal_contact", current.getValue("opened_for"));

if (current.getValue('type') == 'phone')
    newRecord.setValue('contact_type', 'phone');
if (current.getValue('type') == 'chat')
    newRecord.setValue('contact_type', 'chat');


action.openGlideRecord(newRecord);

// Tracks number of "Create Case" clicks on the Interaction form via CSM Agent Workspace
var csmWorkspaceUAUtil = new sn_csm_workspace.CSMWorkspaceUAUtil();
csmWorkspaceUAUtil.createCaseClickInteraction();

intRelUtil = new global.InteractionRelationshipUtil();
if (intRelUtil.copyAttachments !== undefined)
	intRelUtil.copyAttachments(current, newRecord);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have just changed getValue in this to getElement&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;newRecord.setValue("u_contact_email", current.getValue('consumer.email'));&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if that doesn't work use &lt;EM&gt;&lt;STRONG&gt;current.consumer.email&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please mark my answer as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;helpful/correct&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/STRONG&gt;if it resolves your query.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;Regards,&lt;BR /&gt;Chaitanya&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 00:43:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/email-field-not-copying-from-interaction-to-case/m-p/3288371#M43396</guid>
      <dc:creator>Chaitanya ILCR</dc:creator>
      <dc:date>2025-06-13T00:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Email field not copying from Interaction to Case</title>
      <link>https://www.servicenow.com/community/csm-forum/email-field-not-copying-from-interaction-to-case/m-p/3289122#M43419</link>
      <description>&lt;P&gt;Thank you! This worked.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 16:29:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/csm-forum/email-field-not-copying-from-interaction-to-case/m-p/3289122#M43419</guid>
      <dc:creator>ronyates</dc:creator>
      <dc:date>2025-06-13T16:29:46Z</dc:date>
    </item>
  </channel>
</rss>

