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
Gopika KrishnanGopika Krishnan 

Required fields are missing: [LastName] error with drupal

Hi,

I have authorized salesforce with drupal. 

I am using profile2 for extra fields of drupal user. I have lastName mapped to contact Lastname in salesforce mapping. Still when I update a contact I get Required fields are missing: [LastName] error. I can see the contact value is getting updated in salesforce, but this error is not going. 

When I check the drupal logs, I could see the error 
SalesforceException: Required fields are missing: [LastName] in Salesforce->apiCall() 

In the apiCall function of the module, in the params send I could see company__C and lastname empty. But I am not sure why this is happening

And I tried sending a lastname value separtely in the function. At that time what happens is another entry in the contact get inserted..ie for a profile two entries, One with the values that is send via user UI and also with the lastname I put in code.

Any immediate help would be appreciated.
Thomas.SmithThomas.Smith
Hi, 

I suppose another possibiltiy of why this could be happening is due to permissions on the field. Please check that this field is writeable. 

Thanks.
Miles Smith 5Miles Smith 5
Thanks for sharing.I found a lot of interesting information here. A really good post, very thankful and hopeful that you will write many more posts like this one.
viamichelin (https://viamichelin.onl/) putlocker (https://putlocker.ooo/) google earth (https://googleearth.onl/)