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

C# plugin - on Update: Get Quote Id from Quote Product

$
0
0

I am trying to retrieve a Quote Product's (QuoteItem) related QuoteId.  This is part of a c# plugin.  This event must be triggered for the Create and also for the Update of the QuoteItem entity.  It works fine for the Create, but on the Update I get an Error "Object not set to an Entity Reference".

The part that gives me problems is the following:

 var QuoteEntityReferenceValue = QuoteProduct.GetAttributeValue<EntityReference>("quoteid");
                        ColumnSet p_attributes = new ColumnSet(new string[] { "pricelevelid"});
                        Entity Quote = _orgService.Retrieve("quote", QuoteEntityReferenceValue.Id, p_attributes);

 

Christo Vermeulen


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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