Difference between revisions of "CeRecordAPI Reference"

From ADF Docs
Jump to: navigation, search
(sfsRecord)
(ADF ceRecord API Methods)
Line 2: Line 2:
 
==gceRecord==
 
==gceRecord==
 
===addRecord()===
 
===addRecord()===
 +
Description:
 +
* Adds a new record to a Global Custom Element.
 
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.
Line 18: Line 20:
 
** error_msg: string
 
** error_msg: string
 
** error: struct (key added only on error)
 
** error: struct (key added only on error)
Description:
 
* Adds a new record to a Global Custom Element.
 
 
 
===updateRecord()===
 
===updateRecord()===
 +
Description:
 +
* Updates an existing record in a Global Custom Element.
 
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.
Line 39: Line 40:
 
** error_msg: string
 
** error_msg: string
 
** error: struct (key added only on error)
 
** error: struct (key added only on error)
 +
=== saveRecord() ===
 
Description:
 
Description:
* Updates an existing record in a Global Custom Element.
+
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.
 
 
=== 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.
Line 59: Line 59:
 
** error_msg: string
 
** error_msg: string
 
** error: struct (key added only on error)
 
** 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.
 
 
  
 
== lceRecord ==
 
== lceRecord ==
 
=== addRecord() ===
 
=== addRecord() ===
 +
Description:
 +
* Creates a new page and adds a new record to a Local Custom Element on the new page.
 
Arguments:
 
Arguments:
 
* '''ceName''' - The name of the Local Custom Element where the record will be added.
 
* '''ceName''' - The name of the Local Custom Element where the record will be added.
Line 90: Line 89:
 
** error_msg - string
 
** error_msg - string
 
** error - struct (key added only on error)
 
** error - struct (key added only on error)
 +
=== updateRecord() ===
 
Description:
 
Description:
* Creates a new page and adds a new record to a Local Custom Element on the new page.
+
* Updates an existing record in a Local Custom Element on a page.
=== updateRecord() ===
 
 
Arguments:
 
Arguments:
 
* '''ceName''' - The name of the Local Custom Element where the specified record will be updated.
 
* '''ceName''' - The name of the Local Custom Element where the specified record will be updated.
Line 112: Line 111:
 
** error_msg - string
 
** error_msg - string
 
** error - struct (key added only on error)
 
** error - struct (key added only on error)
Description:
 
** Updates an existing record in a Local Custom Element on a page.
 
  
 
== mdfRecord ==
 
== mdfRecord ==
 
=== updateRecord() ===
 
=== updateRecord() ===
 +
Description:
 +
* Updates a metadata form record bound to a page.
 
Arguments:
 
Arguments:
 
* '''mdFormName''' - The name of the Custom Metadata From where the specified record will be updated.
 
* '''mdFormName''' - The name of the Custom Metadata From where the specified record will be updated.
Line 134: Line 133:
 
** error_msg: string
 
** error_msg: string
 
** error: struct (key added only on error)
 
** error: struct (key added only on error)
Description:
+
 
* Updates a metadata form record bound to a page.
 
  
 
== sfsRecord ==
 
== sfsRecord ==
 
=== addRecord() ===
 
=== addRecord() ===
 +
Description:
 +
* Adds a new record to a Simple Form Element
 
Arguments:
 
Arguments:
 
* '''formName''' - The name of the Global Custom Element where the record will be added.
 
* '''formName''' - The name of the Global Custom Element where the record will be added.
Line 155: Line 155:
 
** error_msg - string
 
** error_msg - string
 
** error - struct (key added only on error)
 
** error - struct (key added only on error)
 +
=== updateRecord() ===
 
Description:
 
Description:
* Adds a new record to a Simple Form Element
+
* Updates an existing record in a Simple Form Element
=== updateRecord() ===
 
 
Arguments:
 
Arguments:
 
* '''formName''' - The name of the Global Custom Element where the specified record will be updated.
 
* '''formName''' - The name of the Global Custom Element where the specified record will be updated.
Line 175: Line 175:
 
** error_msg - string
 
** error_msg - string
 
** error - struct (key added only on error)
 
** error - struct (key added only on error)
Description:
 
* Updates an existing record in a Simple Form Element
 

Revision as of 15:36, 4 February 2025

ADF ceRecord API Methods

gceRecord

addRecord()

Description:

  • Adds a new record to a Global Custom Element.

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)

updateRecord()

Description:

  • Updates an existing record in a Global Custom Element.

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)

saveRecord()

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. 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)

lceRecord

addRecord()

Description:

  • Creates a new page and adds a new record to a Local Custom Element on the new page.

Arguments:

  • ceName - The name of the Local Custom Element where the record will be added.
  • subsiteid - The subsiteid of subsite where the new page will be created
  • templateid - The templateid of the template used to create the new page
  • controlid - The controlID value for the element instance where the data will be added
  • pageValues - A struct of standard metadata used to create the new page
  • 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).
  • activatePage - A boolean flag to set the new page as active or inactive after creation
  • useRemoteCreate - A boolean flag used to enable or disable the remote command API for the page creation

Returns:

  • Struct:
    • contentUpdateResponse - string (Success:1 or Success:0)
    • contentUpdated - boolean
    • data - struct
    • pageid - numeric (0 if status=false)
    • subsiteid - numeric
    • templateid - numeric
    • controlid - numeric
    • error_msg - string
    • errorfields - array
    • status - boolean
    • updatefields - array
    • error_msg - string
    • error - struct (key added only on error)

updateRecord()

Description:

  • Updates an existing record in a Local Custom Element on a page.

Arguments:

  • ceName - The name of the Local Custom Element where the specified record will be updated.
  • pageID - The pageID value for the page to be updated
  • controlid - The controlID value for the element instance to be updated
  • dataValues - The fieldname/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
    • pageid - numeric (0 if status=false)
    • controlid - numeric
    • error_msg- string
    • errorfields - array
    • status - boolean
    • updatefields - array
    • error_msg - string
    • error - struct (key added only on error)

mdfRecord

updateRecord()

Description:

  • Updates a metadata form record bound to a page.

Arguments:

  • mdFormName - The name of the Custom Metadata From where the specified record will be updated.
  • pageID - The pageID value for the page where the metadata record to be added/updated
  • dataValues - The fieldname/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
    • pageid: numeric (0 if status=false)
    • error_msg: string
    • errorfields: array
    • status: boolean
    • updatefields: array
    • error_msg: string
    • error: struct (key added only on error)


sfsRecord

addRecord()

Description:

  • Adds a new record to a Simple Form Element

Arguments:

  • formName - 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)

updateRecord()

Description:

  • Updates an existing record in a Simple Form Element

Arguments:

  • formName - 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:
    • content update response - 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)