In our org's STAGE environment, I ran the following code anonymously in the dev console, intending to clear data from a pair of custom fields for ~400 QuoteLineItem records.
void clearOStatusAmtPd() {
List<Schema.QuoteLineItem> qliList = [SELECT id FROM QuoteLineItem WHERE Amount_Paid__c != null or Oracle_Status__c != null];
for (Schema.QuoteLineItem qli : qliList) {
qli.Amount_Paid__c = null;
qli.Oracle_Status__c = null;
}
update qliList;
}
clearOStatusAmtPd();
This code ran without error and the following SOQL query confirmed the results, returning 0 records:
SELECT id FROM QuoteLineItem WHERE Oracle_Status__c != null or Amount_Paid__c != null
I can see quote line item records for a given quote with the following query:
SELECT id, Product2Id, LineNumber, Quantity, TotalPrice, Oracle_Status__c, Amount_Paid__c FROM QuoteLineItem WHERE QuoteId = '0Q040000000WVvECAW'
which returns 5 records.
However, when I try to browse to the quote (https://cs23.salesforce.com/0Q040000000WVvECAW), I see this under the quote line items:
"Content cannot be displayed: Illegal assignment from List<QuoteLineItem> to List<QuoteLineItem>"
I have to say that is one of the most useless error messages, ever. Can anyone help me to figure how to restore the related list view? Do I have retouch all the QuoteLineItem records?
Thanks in advance for any help w/ this.