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

CRM 2011 plugin error: Query builder error, the specified record type does not exist in Microsoft Dynamics CRM

$
0
0

In one of my custom entity I need to set up a campaign entity, which is a look up in my custom entity. When I am trying to set this in plugin I am getting this query build error.

My code looks follows: It is getting the correct campaign, while saving the changes it is giving that error

Entity

entity = (Entity)pluginExecContext.InputParameters["Target"];        

           

varcampaign = GetCampaignID();

           

EntityReferencecampaignRef =newEntityReference("Campaign", campaign.Id);

           

            entity.Attributes.Add(

"cdi_campaignid", campaignRef);

           

            orgServiceContext.SaveChanges();


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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