Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Perl, PHP, Python & Ruby Development
- :
- Error while updating using PERL
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Error while updating using PERL
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-13-2012 07:28 AM
I am using Developer's 30 days trial version and can query data from SF for display. While trying to update the Lead table using PERL (WWW::Salesforce::Simple) I am getting the error.
Lead: bad field names on insert/update call: type
I have double checked and every thing seems to be in order as far as the hash is concerned. Could it be the lack of update/insert access in the trial version or am I missing some thing?
my %newdata;
$newdata{"Email"}=$Email;
$newdata{"id"}=$id;
$newdata{"LeadSource"}=$LeadSource;
$newdata{"FirstName"}=$FirstName;
$newdata{"LastName"}=$LastName;
# update existing record
$result = $sforce->update(type => 'lead',%newdata);
if ($result->result->{"success"} eq "false") {
print $result->result->{errors}->{message} . "\n";
}
The $result hash has the following error message:
undef,
{
'fields' => 'type',
'statusCode' => 'INVALID_FIELD_FOR_INSERT_UPDATE',
'message' => 'Lead: bad field names on insert/update call: type'
},
Re: Error while updating using PERL
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-15-2013 09:27 PM
try
$newdata{"id"}=$id;
$newdata{"Email"}=$Email;
$newdata{"LeadSource"}=$LeadSource;
$newdata{"FirstName"}=$FirstName;
$newdata{"LastName"}=$LastName;
I believe that after type, ID must be next hash field.

