Difference between revisions of "CeRecordAPI Reference"
From ADF Docs
Gcronkright (talk | contribs) (Created page with "=ADF ceRecord API Methods= ==gceRecord== ===addRecord()=== Arguments: * ceName - The name of the Global Custom Element where the record will be added. * dataValues - The field...") |
Gcronkright (talk | contribs) |
||
Line 3: | Line 3: | ||
===addRecord()=== | ===addRecord()=== | ||
Arguments: | Arguments: | ||
− | * ceName - The name of the Global Custom Element where the record will be added. | + | * '''ceName''' - The name of the Global Custom Element where the record will be added. |
− | * dataValues - The field name/value pairs structure for the record to be added. | + | * '''dataValues''' - The field name/value pairs structure for the record to be added. |
− | * fieldSpecs - A field name/specs option pairs structure used to modify the data values expected by the configured field (currently only used for Taxonomy fields). | + | * '''fieldSpecs''' - A field name/specs option pairs structure used to modify the data values expected by the configured field (currently only used for Taxonomy fields). |
Returns: | Returns: | ||
* Struct: | * Struct: | ||
Line 23: | Line 23: | ||
===updateRecord()=== | ===updateRecord()=== | ||
Arguments: | Arguments: | ||
− | * ceName - The name of the Global Custom Element where the specified record will be updated. | + | * '''ceName''' - The name of the Global Custom Element where the specified record will be updated. |
− | * dataPageID - The dataPageID value for the record to be updated | + | * '''dataPageID''' - The dataPageID value for the record to be updated |
− | * dataValues - The field name/value pairs structure of the record to be updated | + | * '''dataValues''' - The field name/value pairs structure of the record to be updated |
− | * fieldSpecs - A field name/specs option pairs structure used to modify the data values expected by the configured field (currently only used for Taxonomy fields). | + | * '''fieldSpecs''' - A field name/specs option pairs structure used to modify the data values expected by the configured field (currently only used for Taxonomy fields). |
Returns: | Returns: | ||
* Struct: | * Struct: | ||
Line 44: | Line 44: | ||
=== saveRecord() === | === saveRecord() === | ||
Arguments: | Arguments: | ||
− | * ceName - The name of the Global Custom Element where the record will be saved. | + | * '''ceName''' - The name of the Global Custom Element where the record will be saved. |
− | * dataValues - The field name/value pairs structure for the record to be saved. A ‘dataPageID’ key/value pair must be included to update a specific record. | + | * '''dataValues''' - The field name/value pairs structure for the record to be saved. A ‘dataPageID’ key/value pair must be included to update a specific record. |
− | * fieldSpecs - A field name/specs option pairs structure used to modify the data values expected by the configured field (currently only used for Taxonomy fields). | + | * '''fieldSpecs''' - A field name/specs option pairs structure used to modify the data values expected by the configured field (currently only used for Taxonomy fields). |
Returns: | Returns: | ||
* Struct: | * Struct: |
Revision as of 15:08, 4 February 2025
Contents
ADF ceRecord API Methods
gceRecord
addRecord()
Arguments:
- ceName - The name of the Global Custom Element where the record will be added.
- dataValues - The field name/value pairs structure for the record to be added.
- fieldSpecs - A field name/specs option pairs structure used to modify the data values expected by the configured field (currently only used for Taxonomy fields).
Returns:
- Struct:
- contentUpdateResponse: string (Success:1 or Success:0)
- contentUpdated: boolean
- data: struct
- datapageid: numeric (0 if status=false)
- error_msg: string
- errorfields: array
- status: boolean
- updatefields: array
- error_msg: string
- error: struct (key added only on error)
Description:
- Adds a new record to a Global Custom Element.
updateRecord()
Arguments:
- ceName - The name of the Global Custom Element where the specified record will be updated.
- dataPageID - The dataPageID value for the record to be updated
- dataValues - The field name/value pairs structure of the record to be updated
- fieldSpecs - A field name/specs option pairs structure used to modify the data values expected by the configured field (currently only used for Taxonomy fields).
Returns:
- Struct:
- contentUpdateResponse: string (Success:1 or Success:0)
- contentUpdated: boolean
- data: struct
- datapageid: numeric (0 if status=false)
- error_msg: string
- errorfields: array
- status: boolean
- updatefields: array
- error_msg: string
- error: struct (key added only on error)
Description:
- Updates an existing record in a Global Custom Element.
saveRecord()
Arguments:
- ceName - The name of the Global Custom Element where the record will be saved.
- dataValues - The field name/value pairs structure for the record to be saved. A ‘dataPageID’ key/value pair must be included to update a specific record.
- fieldSpecs - A field name/specs option pairs structure used to modify the data values expected by the configured field (currently only used for Taxonomy fields).
Returns:
- Struct:
- contentUpdateResponse: string (Success:1 or Success:0)
- contentUpdated: boolean
- data: struct
- datapageid: numeric (0 if status=false)
- error_msg: string
- errorfields: array
- status: boolean
- updatefields: array
- error_msg: string
- error: struct (key added only on error)
Description: Adds or updates a Global Custom Element record. Updates the record if an existing ‘datapageid’ value greater than 0 is passed in with the dataValues, otherwise it will create a new record.