rbf_createRecordMultiPart

Warning: Support for using this method with external objects (such as those mapped to external tables, to OpenEdge Service objects, or through a HDP connection) is a beta feature. This method is supported in production systems, except for external objects.

Purpose

This method creates a new record without changing the UI presentation. If an error occurred during operation error notification procedure will be invoked. For all fields including the file and image upload that allow values in multiple languages, you can specify those values using the fieldMap parameter. When setting field values, it is mandatory to set a field value in the tenant's base language.

The current user must have Create permission on the selected object type to run this API.

Syntax

rbf_createRecordMultiPart(objName, fieldMap, useIds, callback, useLegacyDateFormat)

Parameters

objName

The object integration name.

fieldMap

A JSON object of the form: {"fieldIntegrationName1":value1, "fieldIntegrationName2":value2}. When setting field values for multilingual fields, each value can be a JSON object, for example:

{"fileupload":"","imageupload":"","fieldIntegrationName1":{"en":"EnglishValue1","ar":"ةشغشىن","fr":"FrenchValue1"}, 
"fieldIntegrationName2":{"en":"EnglishValue2","ar":"ةشغشىن","fr":"FrenchValue2"}}
Note: This API does not accept the file path due to security reasons. To upload the files and images, select the files from the UI and execute the API.

useIds

If true, the API will accept numeric IDs; if false (default) the API will return integration codes for status fields and picklists

callback

A callback function that will receive the new record ID as its parameter

useLegacyDateFormat

This optional parameter only applies to JSON output and, specifically, to Date and Date/Time fields. If true, or if not specified, a date value is returned as a Date object. If false, a date value is returned as a String.

Note: This API is supported in portals as well.

Example

The following example returns the query to create a multi part record:

 function my_callback(count) {
console.log("Count is: " + count);
} 
rbf_createRecordMultiPart("newobj1",{"fileupload":"","imageupload":"", "fileText":{"en":"EnglishValureq1","fr":"FrenchrValueq1"}},false, my_callback, false);