Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Phone Call in silverlight : How to assign value in 'To' and 'From '

$
0
0

Hi all,

I have to create phone call by silverlight application using Soap .I have create it but Value in To is  not assign.

  Entity entity = new Entity();
                entity.LogicalName = "phonecall";
                entity.Id = new Guid(); //if we will not pass, API will create

 entity["subject"] = txtSubject.Text;

  service.BeginCreate(entity, new AsyncCallback(CreateRecord), service);

 void CreateRecord(IAsyncResult result)
        {
            Guid id = ((IOrganizationService)result.AsyncState).EndCreate(result);
            Deployment.Current.Dispatcher.BeginInvoke(delegate { SetStateCode(id); });
        }

 void SetStateCode(Guid recordId)
        {

            Entity from = new Entity();
           // from = new Entity();
            from.LogicalName = "activityparty";
            from["partyid"] = new EntityReference() { LogicalName = "contact", Id = new Guid("6A6964DA-1BAB-E211-BC1B-984BE173A3B9")

};
            from["activityid"] = new EntityReference() { LogicalName = "phonecall", Id = recordId };

            OptionSetValue osv = new OptionSetValue();
            osv.Value = 1;//for "sender" field

            from["participationtypemask"] = osv;

            IOrganizationService service = SilverlightUtility.GetSoapService();
            service.BeginCreate(from, new AsyncCallback(CreateToOrFrom), service);

}

Any Suggestion or link

 


Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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