Search code examples
perlquickbase

QuickBase Perl API: Not able to edit a Record


I am trying to update a Quickbase record via my Perl script. I am following the Perl API documentation: http://metacpan.org/pod/HTTP::QuickBase

The method used for editing a record is "EditRecord". As per this method, you cannot edit built-in fields which is true.

and I know that I am not modifying built-in field but an user-created field.

e.g. I want to modify the field called "OS" to "Windows"

So per the Perl modules CPAN documentation mentioned above, I do this:

my %new_record=$qb_obj->GetRecord($database_id, $record_id);
$new_record{"OS"}="Windows";
$qb_obj->EditRecord($database_id, $record_id, %new_record);

But I get following error:

The field named "Date Created" with field id 1 cannot be modified

Which basically means that I ma trying to modify the field "Date Created" with Field ID "1". However, I am not doing that. It might be pulling that parameter some how. THe perl as well as the Quickbase documentation is not helping much.

Here is the Quickbase API documentation: http://www.quickbase.com/api-guide/edit_record.html#Overview

Can someone help me on this.

thanks.


Solution

  • Since you already know the id of the record, you don't need to read the record before modifying it. You should be able to just remove your first line, create the %new_record without reading it from QB, then your 2nd and 3rd lines should work fine. The alternative is to remove the built-in QB fields from %new_record before doing the EditRecord.