CPQ mandatory item cannot be deleted without parent ?
Summary: Trying to delete line item with API and getting error "Mandatory item cannot be deleted without parent"
Here is the code. We hard coded values just to check if this can work. But it is giving error. Any ideas?
userParameterDict = dict("string");
transactionID = "4044544513";
documentNumber = "27";
webservice_url="https://"+companyName+".bigmachines.com/rest/v14/commerceDocumentsQuickstart_commerce_processQuote_process/"+transactionID+"/line_process/"+documentNumber";
requestLoad = json();
loadArr = jsonput(requestLoad,"selections",jsonarray());
jsonarrayappend(loadArr,"line_process/"+documentNumber);
header = dict("string");
put(header,"Accept","application/json");
put(header,"Content-Type","application/json");
responseBody = urldata(webservice_url, "DELETE", header, jsontostr(requestLoad));
print responseBody;
return "";