Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

create phonecall with powershell

$
0
0

Hi, is there an option how to set a To and From attributes, when I am creating a phonecall with powershell script?

I can set regardingobjectid, but I can't find how can I set To and From attributes.

   try{
          $Activity.ActivityId = New-CrmRecord -conn $CrmConnection -EntityLogicalName phonecall -Fields @{"subject"=$data.communication_subject;"description"=$data.communication_message;"scheduledstart"=$data.end;"scheduledend"=$data.end;"regardingobjectid"=(New-CrmEntityReference -EntityLogicalName $data.REGARDING_entity -Id $data.REGARDING_GUID); #this works well"to"=(New-CrmEntityReference -EntityLogicalName $data.TO_entity -Id $data.TO_GUID);#this doesn't
          }
   }
   Catch{}

Phonecall is created, but 'to' attribute is empty.
Is there any cmdlet for CRM 2016, which can create ActivityParty?

Thanks


Viewing all articles
Browse latest Browse all 79901


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>