Hi all,
when i select one record from subgrid and click won button on the subgrid i have to update the value of the status field on the form to WON, below is the code with which i tried to achieve this task.
its entering into inside if statement, can we the code inside if statement
WonButtonAsscoicate: function (recordId) {
debugger;
var oDataEndpointUrl = CEC.ProjectBid.GetOdataURL();
oDataEndpointUrl += "ccc_projectbidsSet?$filter=ccc_Status/Value eq 280000000 and ccc_projectbidsId eq guid'" + recordId + "'";
var requestResults = CEC.ProjectBid.ExecuteODATAQuery(oDataEndpointUrl);
if (requestResults != null && requestResults.results.length == 1) {
Xrm.Page.getAttribute("ccc_status").setValue(280000002);
Xrm.Page.data.save();
}
},
Thanks,
Tharun