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

i'm getting an error as below, when i try to retrieve account lookup id in opportunity entity through plugin

$
0
0

The error

ystem.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Opportunity1.subgrid.Execute(IServiceProvider serviceProvider)

The Code

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


EntityReference ownerLookup = (EntityReference)entity.Attributes["parentaccountid"];
Guid accountid = ownerLookup.Id;

 

can any one help me here?


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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