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
RhondaBRhondaB 

URGENT -- Error please help

Hi all,
 
I added a new custom field to Opportunities and in then in Downloaded the new wsdl, saved it to my project and updated the Web Reference.  Now when I try to run my code I get this error.  What else do I need to do?
 

INVALID_FIELD: Pricebook2Id,Competitor__c,Discount__c,K2Partner__c,K2_Maintenance__c,K2_Maintenance_Notes__c ^ ERROR at Row:1:Column:162 No such column 'K2Partner__c' on entity 'Opportunity'. 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.

 

The weird thing is when I reference the filed this way, it sees that it exists. 

 

sForce.Opportunity obj = (sForce.Opportunity)qrOpp.records[i];

strAccountID = obj.AccountId;

strK2Partner = obj.K2Partner__c.ToString();

 

Thanks in advance for you help.

Rhonda

SuperfellSuperfell
Is it being hidden by FLS ? (Field Level Security)
RhondaBRhondaB

When I created the field, I made sure that visible was checked in Step 3.  I just went back and checked it and it is still checked.

 

Thanks,

Rhonda

 

RhondaBRhondaB
When I look in the object browser I can see the field in opportunity, but it still gets this error.  I have deleted the web reference and recreated it but that didn't fix it either.  I've added custome fields in the past and have not had a problem.  I am completely stumped.
 
Please help!
 
Rhonda
SuperfellSuperfell
What happens it you try your query from AppExchange Explorer ?
RhondaBRhondaB

umm how do I do that?

 

Rhonda

RhondaBRhondaB

Ok so I found the AppExchange Explorer and tried to query.  The custom field does not appear.  It is a lookup field to a custom table if that helps.

 

Thanks,

 

Rhonda

RhondaBRhondaB

So I just discovered that custome fields for some reason doesn't like lookup fields although you can create it.  I deleted the field and recreated it as a text field and it works.  Is this a bug or feature?

 

Rhonda

SuperfellSuperfell
Lookup Fields on standard objects are only available in the 7.0 version of the API.
RhondaBRhondaB
Our users don't want to have to type that value but rather select it from a dynamic list.  Is there a way to populate a second text field once there was a selection made of that field?
 
Rhonda