dynamics crm 2016 - Web API query- dynamic values
<p>I'm trying to form a query to retrieve related record properties in the new Dynamics CRM (2016) Web API. But I am unable to pass the GUID value dynamically unlike in CRM 2011-2015. </p>

<pre><code>function getRelatedEntityStartAndEndDates(){

    var parentOpportunity = Xrm.Page.getAttribute("rb_opportunityid").getValue()[0].id;

    var clientUrl =  Xrm.Page.context.getClientUrl();

    var query = clientUrl +"/api/data/v8.0/opportunities(5e0f714-a0c6-e511-812b-061cb19131a3)?$select=rb_enddate,rb_startdate"; 

    alert(query);

}
</code></pre>

<p>Since the new query doesn't have quotes around GUID, I'm unable to pass on the <strong>parentOpportunity</strong> dynamically.</p>