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

CRM Online 2015 - Retrieve using Plugin

$
0
0

Hi,

Can anyone help me? It's already been a day and I can't use the plugin properly. I'm a newbie in plugin customization. Actually it's my first time customizing CRM using Plugin.

I'm trying to update an entity record through lookup. Here's my code:

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

Guid parentRef = ((EntityReference)entity.Attributes["new_parentlookup"]).Id;
Console.WriteLine(parentRef);

var parentEntity = service.Retrieve("new_parententity", parentRef, new ColumnSet(new string[] { "new_estnoofhours" }));
parentEntity["new_estnoofhours"] = entity["new_estnoofhours"];

service.Update(parentEntity);

Can anyone help me please?

Thanks. 


Viewing all articles
Browse latest Browse all 55831

Trending Articles



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