---
schema_version: "1"
id: 79708ef5d386012be5efdb954024259da644c8916cf9c9a117a2a6820b0d71a9
title: Interface RecordBuilder
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforce-functions/functions/guide/javasdk/interfaces/java-recordbuilder.md
canonical_url: https://developer.salesforce.com/docs/platform/functions/guide/java-recordbuilder.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 694c942305cda74ad2d1976c1712b2605321737f57a582d00d47ef60e112cda3
products:
  - Salesforce Functions
---
# Interface RecordBuilder 

All Superinterfaces: `RecordAccessor`

------------------------------------------------------------------------

public interface RecordBuilder extends RecordAccessor

Builder for `Record`.

See Also: `DataApi.newRecordBuilder(String)`

## Method Summary

| Modifier and Type | Method                                                        | Description                                                                           |
| ----------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `Record`          | `build()`                                                     | Returns a new and immutable `Record` instance based on the information stored in this builder.          |
| `RecordBuilder`   | `withField(java.lang.String name,boolean value)`              | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField (java.lang.String name,byte value)`                | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField(java.lang.String name,double value)`               | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField(java.lang.String name,float value)`                | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField(java.lang.String name,int value)`                  | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField(java.lang.String name,long value)`                 | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField(java.lang.String name,short value)`                | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField(java.lang.String name,ReferenceId value)`          | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField(java.lang.String name,java.lang.String value)`     | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField(java.lang.String name,java.math.BigDecimal value)` | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withField(java.lang.String name,java.math.BigInteger value)` | Sets the value of a field.                                                            |
| `RecordBuilder`   | `withNullField (java.lang.String name)`                       | Sets the value of a field to `null`.                                                  |
| `RecordBuilder`   | `withoutField (java.lang.String name)`                        | Removes a field from this record builder.                                             |

### Methods inherited from interface com.salesforce.functions.jvm.sdk.data.RecordAccessor {#methods.inherited.from.class.com.salesforce.functions.jvm.sdk.data.RecordAccessor}

`getBigDecimalField, getBigIntegerField, getBooleanField, getByteField, getDoubleField, getFieldNames, getFloatField, getIntField, getLongField, getShortField, getStringField, getType, hasField, isNullField`

## Method Details

### build

\@Nonnull Record build()

Returns a new and immutable `Record` instance based on the information
stored in this builder.

Returns: The new `Record` instance.

### withoutField

\@Nonnull RecordBuilder withoutField​(java.lang.String name)

Removes a field from this record builder.

It will remove the field entirely and will not set it to null. To set a
field\'s value to `null`, use `withNullField(String)`.

Parameters: `name` - The name of the field. Returns: This
`RecordBuilder` instance to allow method chaining.

### withNullField

\@Nonnull RecordBuilder withNullField​(java.lang.String name)

Sets the value of a field to `null`.

Parameters: `name` - The name of the field. Returns: This
`RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, \@Nullable
java.lang.String value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, short value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, long value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, int value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, float value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, double value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, byte value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, boolean value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, \@Nullable
java.math.BigInteger value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, \@Nullable
java.math.BigDecimal value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.

### withField

\@Nonnull RecordBuilder withField​(java.lang.String name, \@Nullable
ReferenceId value)

Sets the value of a field.

Parameters: `name` - The name of the field. `value` - The value to set.
Returns: This `RecordBuilder` instance to allow method chaining.
