+ Start a Discussion

invalid field - the old chestnut

Found loads of post ofr this on this forum but none seem to be helpful in my case.


I create a lead in php script. Set standard and custom fields. Script works like charm.

Now I want to fill one more field that is a look up relationship.  Thi is too much for my little script, I get the fatal error.


I checked the profile permisssion - field is visible and writable;

I checked spelling and wsdl definition and now I'm giving up.

Can someone solve the puzzle for me



<element name="Current_Gas_Supplier__c" nillable="true" minOccurs="0" type="tns:ID"/>



$LeadObject->Current_Gas_Supplier__c = 'ID_fetched_from_SF';


insert tells me there is no such column on Lead

creating a Gas_Suppliers__c object with populated id and assigning to Current_Gas_Supplier__r changes nothing.


Please point me  the user/toolkit error?



Park Walker (TAGL)Park Walker (TAGL)

Field names ending in __r are defined when a parent-child relationship exists. Since you have provided just a snippit or the WSDL it's not clear where the fields you show are defined, but if you can provide the Lead portion of the WSDL it should become apparent.