CRM 2015 fetchXML with XRMServiceToolkit

function execpricecalc(pricelevelid)
{
    var entityXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
        "<entity name='new_zcalcprice'>" +
        "<attribute name='new_name' />" +
        "<order attribute='new_name' descending='false' />" +
        "<filter type='or'>" +
        "<condition attribute='new_product' operator='eq' value='" + getLookupGuid("new_product") + "' />" +
        "<condition attribute='new_pricelevelid' operator='eq' value='" + pricelevelid + "'/>" +
        "<condition attribute='new_priceperunit' operator='eq' value='" + getValue("new_priceperunit") + "' />" +
        "<condition attribute='new_quantity' operator='eq' value='" + getValue("new_quantity") + "' />" +
        "<condition attribute='new_baseamount' operator='eq' value='" + getValue("new_extendedamount") + "' />" +
        "<condition attribute='new_baseamount' operator='eq' value='" + getValue("new_tax") + "' />" +
        "<condition attribute='new_baseamount' operator='eq' value='" + getValue("new_volumediscountamount") + "' />" +
        "<condition attribute='new_baseamount' operator='eq' value='" + getValue("new_manualdiscountamount") + "' />" +
        "</filter>" +
        "</entity>" +
        "</fetch>";

    var pricerecord = XrmServiceToolkit.Soap.Fetch(entityXML);

}

Leave a Reply

Your email address will not be published. Required fields are marked *