CPQ mandatory item cannot be deleted without parent ? — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

CPQ mandatory item cannot be deleted without parent ?

edited Aug 1, 2025 12:29PM in Configure Price Quote 3 comments

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 "";

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!