• bild
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 15
    Replies
I doubt this is simply a perl problem.

When creating Contact or Lead objects, if the 'phone' field was passed as a simple string of numbers, with no spaces, dashes, or other non-numeric characters, the create will fail with the error message:

value not of required type

People filling out web forms with free-form inputs for the phone field (which are pretty well required if you have international customers) often type in something like:

2125551234

... which is a valid US phone number.

If I add a space, or any other non-numeric character to the field before sending it to create, it works fine. This seems like a bug to me.

My current workaround for this is to check the phone number, and if it contains no spaces, to add one. This is slightly lame, but it works.
  • December 09, 2005
  • Like
  • 0

I am using the 0.55 of the Salesforce.pm access objects I downloaded from sf.

I attempt to create a lead like this:

my $name_last = "Dude" ;

my $company = "" ;

my $port = &doLogin() ; # works fine.

my $result = $port->create('type' => 'Lead',
'LastName' => $name_last,
'Company' => $company,
) ;

if ($result->fault()) {
... throw an error ...
}

I do NOT see a fault (I have detected faults for bad SOQL syntax, so at least some of the time, it is working). But the object in //createResponse/result looks like:


$VAR1 = {
'success' => 'false',
'errors' => {
'fields' => 'Company',
'statusCode' => 'REQUIRED_FIELD_MISSING',
'message' => 'Required fields are missing: [Company]'
},
'id' => undef
};

So my questions are:

1. If the action did not succeed, why did $result->fault() not return true?
2. If a field (like Company) is required, does that mean that there HAS to be printable characters in there? (Neither empty string nor a string with a space (" ") will do).
3. Is there a way, using the website or otherwise, to make it so that 'Company' is not required in a Lead?
  • October 14, 2005
  • Like
  • 0
If I specify a batch size of 25 and then perform a query like "SELECT FirstName, LastName from contact", will I get the 25 most recently created contacts?

If not, which contacts will I get? And if not, how can I query for the 25 most recently created contacts?

Thanks,
Charlie

Message Edited by cwood on 04-05-2006 10:17 AM

Message Edited by cwood on 04-05-2006 10:17 AM

  • April 05, 2006
  • Like
  • 0
I'm getting this error when I try to create a Case Comment via the API

Unable to create/update fields: CreatedById. Please check the security settings of this field and verify that it is read/write for your profile.:

I'm handling the portion that logs into Salesforce with an Admin user, but trying provide functionality to allow other users that can successfully login to the selfservice user portion to add comments. So the CreatedById that I'm sending is that of the self service user, not the person that I've used for the login/session stuff.

Will I need to try to login and set the session for a self-service user or something?

Please advise,

Joe
Someone recently asked this in the .Net forum. I need to ask the same question, but in regards to PHP:

We have created a Workflow to email us when a lead is updated and meets a certain criteria. This triggers fine when done through the Salesforce front-end, but not through the API. Does email not trigger through the API?

On the .Net forum, the answer from Simon was that email does trigger, nothing special needed. However, the Sales team I work for says they do NOT get email with API-driven forms. But they DO get email with Web-to-lead forms. Obviously, something is wrong. The question is, what needs fixing?

(Disclaimer: I'm using the nusoap module, and I do have Lead Assignment Rules working -- so the lead is routing properly, but no one is being notified of the leads coming in.)

-Tony
  • December 14, 2005
  • Like
  • 0
I know the answer was 'no' in v5, but I can't find an answer (or any documentation) in v6.

Can you trigger the web-to-lead auto-response rules via the API in 6?

Thanks,

-js
  • October 29, 2005
  • Like
  • 0

I am using the 0.55 of the Salesforce.pm access objects I downloaded from sf.

I attempt to create a lead like this:

my $name_last = "Dude" ;

my $company = "" ;

my $port = &doLogin() ; # works fine.

my $result = $port->create('type' => 'Lead',
'LastName' => $name_last,
'Company' => $company,
) ;

if ($result->fault()) {
... throw an error ...
}

I do NOT see a fault (I have detected faults for bad SOQL syntax, so at least some of the time, it is working). But the object in //createResponse/result looks like:


$VAR1 = {
'success' => 'false',
'errors' => {
'fields' => 'Company',
'statusCode' => 'REQUIRED_FIELD_MISSING',
'message' => 'Required fields are missing: [Company]'
},
'id' => undef
};

So my questions are:

1. If the action did not succeed, why did $result->fault() not return true?
2. If a field (like Company) is required, does that mean that there HAS to be printable characters in there? (Neither empty string nor a string with a space (" ") will do).
3. Is there a way, using the website or otherwise, to make it so that 'Company' is not required in a Lead?
  • October 14, 2005
  • Like
  • 0