rbv_api.createRecord(ObjName, Array) with Picklist Field in

Posted by Meryk on 03-Jul-2015 09:00

Hi,

I am trying to use rbv_api.createRecord(objName, arr) method like that :

columnArr["name"] = 'Column ' + i ;
columnArr["positionInSection"] = i;

rbv_api.createRecord('webPageColumn1', columnArr);

The record is created with the right name, but 'positionInSection' field is empty. It is actually a picklist. and the number 'i' I am trying to put in belongs to the picklist values, so should be fine.

Am I doing something wrong or is there a restriction in this function for picklist fields ?

Thank you

Mery

Posted by Godfrey Sorita on 03-Jul-2015 09:12

Hi Mery,

You need to convert the number into a string to properly set the value of the picklist. In this case, you should write the code as:

columnArr["positionInSection"] = String(i);


Regards,
Godfrey

All Replies

Posted by Godfrey Sorita on 03-Jul-2015 09:12

Hi Mery,

You need to convert the number into a string to properly set the value of the picklist. In this case, you should write the code as:

columnArr["positionInSection"] = String(i);


Regards,
Godfrey

Posted by Meryk on 03-Jul-2015 09:18

Thank you Godfrey, it is working properly now.

Mery

This thread is closed