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

CRM 2016 get quote status from quote product form javascript

$
0
0

Hi , could anyone guide me to get quote id from quote product form side javascript. i have tried below using sdk.rest retrieve record but i get error

function on_product_save() {

    var quotedetailid = Xrm.Page.data.entity.getId();
    returnQuoteid(quotedetailid);
//get quote status 
//if draft then do more
}

function returnQuoteid(quotedetailid)
{
    SDK.REST.retrieveRecord(
         quotedetailid,
         "QuoteDetail",
         null, null,
         function (quotedetail) {
             alert("Quoteid :" + quotedetail.quoteid.Value);
         },
         errorHandler
       );

}


this gives me an error  Unable to get property 'Value' of undefined or null reference 

quoteid undefined , can we only read values on form attributes ? 

All I need to do is when user save or load quote product get quote status , if quote status in Draft then check some custom fields values of quote product filled or not .


Viewing all articles
Browse latest Browse all 79901

Trending Articles