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

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 82002

Latest Images

Trending Articles



Latest Images