0

I am encountering below error when trying to deploy the a class. Below is error and class. I am not sure why i am getting this error inspite of having the custom field on entity.

error is

No such column 'Single_Donor__c' on entity 'OpportunityLineItem'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

if(quoteRecordtype=='Primary Cells Request'){ 
        olist = [Select Id, OpportunityId, SortOrder, PricebookEntryId, Quantity,ETA__c, 
        TotalPrice, UnitPrice, ListPrice, ServiceDate, Description, CreatedDate, 
        CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, Sales_Discount__c,opportunity.recordtype.name,
        Age__c,Anticoagulant__c,Cell_Isolation__c,Cells_per_Vial__c,Multiple_Donors__c,Single_Donor__c,Product_State__c,Desired_Cell_type__c,
        Donor_Blood_Type__c,End_Age__c,Ethnicity__c,Gender__c,Healthy_Tissue_Type__c,Product_Specifications__c,
        Medication_Constraints__c,Other_Info__c,Medication_Constraints_Other__c,Specific_Donor_s__c,HLA_Type__c,ADCC_Status__c,
       Other_Requirements__c,additional_testing__c,Spec_Description__c,Smoker__c,Unit_Cost_Price__c,Discount,CurrencyISOCode,
        IsDeleted , PricebookEntry.Name, PricebookEntry.Product2id,  Shipping_Cost__c, PricebookEntry.Product2.recordtype.name, PricebookEntry.Product2.Part_Id__c
        From OpportunityLineItem 
        where OpportunityId = :quote.Opportunity__c and product_sector__c = 'Primary Cells'];
        }

Any help is appreciated.

closed as off-topic by Adrian Larson, Mohith Shrivastava, Mark Pond, Sebastian Kessel, Ratan Paul Sep 10 '16 at 2:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – Adrian Larson, Mohith Shrivastava, Mark Pond, Sebastian Kessel, Ratan Paul
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Error is clear. Single_Donor__c does not exist on opp line item – Tushar Sharma Sep 9 '16 at 17:49
  • Looks like you forgot to add Single_Donor__c field to the changeset. – Avinash Sep 9 '16 at 17:50
  • If field is there then check for the permission of the field – Tushar Sharma Sep 9 '16 at 17:51
  • I have checked and performed all the 3 steps. 1. The field exists in production. 2. I copied and created the same fields in production. I have checked the permissions and FLS. – user31302 Sep 9 '16 at 17:53
  • 1
    The field does not exist in the changes or in production then. Double and triple check the API name of the field. That error has not been the source of a bug, rather it IS correct and telling you to check again. – Eric Sep 9 '16 at 18:10
1

The field does not exist in the changes or in production then.

Double and triple check the API name of the field.

That error has not been the source of a bug, rather it IS correct and telling you to check again.