function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
scottrmscottrm 

updates to custom fields in opportunityline item being ignored

I am running an update to some custom fields in the opportunitylineItem object via the Salesforce API from some C#/.Net code. I am not getting an error back but my updated values are being ignored. However as part of the same update I can seem to update non-custom fields ok.


 

Code is standard like in C#

 

 var qr = binding.query(string.Format("Select Id, Quantity, Quantity_Used__c from OpportunityLineItem where Id = {0}", Id));   

var lineItem = (OpportunityLineItem) qr.records[0];   

 

lineItem.Quantity = developments; 

 lineItem.Quantity_Used__c = developments; 

 

 var items = new OpportunityLineItem[1];   

items[0] = lineItem;   

binding.update(items);

 


If I examine the contents of the saveresult returned from the udpate I do not get any errors but Quanity is updated but value for Quantity_Used__c is ignored.

 

The logged in user has read/write permissions on all fields

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

The sticky at the top of this forum titled "Why is my date/number/boolean update being ignored"

All Answers

SuperfellSuperfell

The sticky at the top of this forum titled "Why is my date/number/boolean update being ignored"

This was selected as the best answer
scottrmscottrm

thanks solution staring me in the face and I did not see it!