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

deserialize parameter Error in ms crm 2015

$
0
0

Hi 

I am trying  to update  records in ms crm 2015 using console application  with c#.

I got as below  Error is "Additional information: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter".

Please help me out this.

My Code Is:

#region PortalUser Update

using (var mageCRMContext = new MageCRMDataContext(_serviceProxy))

{
var PUser = (from P in mageCRMContext.mage_portaluserSet.Where(p => p.Id ==PortalUserId)
select P.Id);

//var PUser = mageCRMContext.mage_portaluserSet.Where(p => p.mage_name == PortalUsername);
// Create a column set to define which attributes should be retrieved.
ColumnSet PUserColum = new ColumnSet(new string[] { "mage_name" });
_PortalUserId = (PUser.ElementType).GUID;
// // Retrieve the Portal User and its name attributes.
if (_PortalUserId != Guid.Empty)
{

Mage.Crm.Entities.mage_portaluser PortalUserEntity = new Mage.Crm.Entities.mage_portaluser();

PortalUserEntity.Id = _PortalUserId;
PortalUserEntity["mage_name"] = "PortalUsername";

_serviceProxy.Update(PortalUserEntity);

}
}

Console.WriteLine("Portal User records are Updated ...");
Console.ReadKey(true);


Viewing all articles
Browse latest Browse all 55831

Trending Articles



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