Chilkat Online Tools

delphiDll / Salesforce Platform APIs / Update a Record

Back to Collection Items

var
http: HCkHttp;
success: Boolean;
json: HCkJsonObject;
sbRequestBody: HCkStringBuilder;
resp: HCkHttpResponse;
sbResponseBody: HCkStringBuilder;
jResp: HCkJsonObject;
respStatusCode: Integer;
apiName: PWideChar;
eTag: PWideChar;
DisplayValue: PWideChar;
Value: PWideChar;
Active__cDisplayValue: PWideChar;
Active__cValue: PWideChar;
AnnualRevenueDisplayValue: PWideChar;
AnnualRevenueValue: PWideChar;
BillingCityDisplayValue: PWideChar;
BillingCityValue: PWideChar;
BillingCountryDisplayValue: PWideChar;
BillingCountryValue: PWideChar;
BillingPostalCodeDisplayValue: PWideChar;
BillingPostalCodeValue: PWideChar;
BillingStateDisplayValue: PWideChar;
BillingStateValue: PWideChar;
BillingStreetDisplayValue: PWideChar;
BillingStreetValue: PWideChar;
CreatedByDisplayValue: PWideChar;
ApiName: PWideChar;
ETag: PWideChar;
IdDisplayValue: PWideChar;
IdValue: PWideChar;
NameDisplayValue: PWideChar;
NameValue: PWideChar;
Id: PWideChar;
LastModifiedById: PWideChar;
LastModifiedDate: PWideChar;
RecordTypeId: PWideChar;
RecordTypeInfo: PWideChar;
SystemModstamp: PWideChar;
WeakEtag: Integer;
CreatedByIdDisplayValue: PWideChar;
CreatedByIdValue: PWideChar;
CreatedDateDisplayValue: PWideChar;
CreatedDateValue: PWideChar;
CustomerPriority__cDisplayValue: PWideChar;
CustomerPriority__cValue: PWideChar;
DescriptionDisplayValue: PWideChar;
DescriptionValue: PWideChar;
FaxDisplayValue: PWideChar;
FaxValue: PWideChar;
IndustryDisplayValue: PWideChar;
IndustryValue: PWideChar;
LastModifiedByDisplayValue: PWideChar;
ValueApiName: PWideChar;
ValueETag: PWideChar;
ValueId: PWideChar;
ValueLastModifiedById: PWideChar;
ValueLastModifiedDate: PWideChar;
ValueRecordTypeId: PWideChar;
ValueRecordTypeInfo: PWideChar;
ValueSystemModstamp: PWideChar;
ValueWeakEtag: Integer;
LastModifiedByIdDisplayValue: PWideChar;
LastModifiedByIdValue: PWideChar;
LastModifiedDateDisplayValue: PWideChar;
LastModifiedDateValue: PWideChar;
NumberOfEmployeesDisplayValue: PWideChar;
NumberOfEmployeesValue: PWideChar;
NumberofLocations__cDisplayValue: PWideChar;
NumberofLocations__cValue: PWideChar;
OwnerDisplayValue: PWideChar;
OwnerIdDisplayValue: PWideChar;
OwnerIdValue: PWideChar;
OwnershipDisplayValue: PWideChar;
OwnershipValue: PWideChar;
ParentDisplayValue: PWideChar;
ParentValue: PWideChar;
ParentIdDisplayValue: PWideChar;
ParentIdValue: PWideChar;
PhoneDisplayValue: PWideChar;
PhoneValue: PWideChar;
RatingDisplayValue: PWideChar;
RatingValue: PWideChar;
SLAExpirationDate__cDisplayValue: PWideChar;
SLAExpirationDate__cValue: PWideChar;
SLASerialNumber__cDisplayValue: PWideChar;
SLASerialNumber__cValue: PWideChar;
SLA__cDisplayValue: PWideChar;
SLA__cValue: PWideChar;
ShippingCityDisplayValue: PWideChar;
ShippingCityValue: PWideChar;
ShippingCountryDisplayValue: PWideChar;
ShippingCountryValue: PWideChar;
ShippingPostalCodeDisplayValue: PWideChar;
ShippingPostalCodeValue: PWideChar;
ShippingStateDisplayValue: PWideChar;
ShippingStateValue: PWideChar;
ShippingStreetDisplayValue: PWideChar;
ShippingStreetValue: PWideChar;
SicDisplayValue: PWideChar;
SicValue: PWideChar;
SiteDisplayValue: PWideChar;
SiteValue: PWideChar;
TickerSymbolDisplayValue: PWideChar;
TickerSymbolValue: PWideChar;
TypeDisplayValue: PWideChar;
TypeValue: PWideChar;
UpsellOpportunity__cDisplayValue: PWideChar;
UpsellOpportunity__cValue: PWideChar;
WebsiteDisplayValue: PWideChar;
WebsiteValue: PWideChar;
id: PWideChar;
lastModifiedById: PWideChar;
lastModifiedDate: PWideChar;
recordTypeId: PWideChar;
recordTypeInfo: PWideChar;
systemModstamp: PWideChar;
weakEtag: Integer;

begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

http := CkHttp_Create();

// Use this online tool to generate code from sample JSON: Generate Code to Create JSON

// The following JSON is sent in the request body.

// {
//   "allowSaveOnDuplicate": false,
//   "fields": {
//     "FieldAPIName": "FieldValue"
//   }
// }

json := CkJsonObject_Create();
CkJsonObject_UpdateBool(json,'allowSaveOnDuplicate',False);
CkJsonObject_UpdateString(json,'fields.FieldAPIName','FieldValue');

// Adds the "Authorization: Bearer <access_token>" header.
CkHttp_putAuthToken(http,'<access_token>');
CkHttp_SetRequestHeader(http,'Content-Type','application/json');

sbRequestBody := CkStringBuilder_Create();
CkJsonObject_EmitSb(json,sbRequestBody);

resp := CkHttp_PTextSb(http,'PATCH','https://domain.com/services/data/v{{version}}/ui-api/records/:RECORD_ID',sbRequestBody,'utf-8','application/json',False,False);
if (CkHttp_getLastMethodSuccess(http) = False) then
  begin
    Memo1.Lines.Add(CkHttp__lastErrorText(http));
    Exit;
  end;

sbResponseBody := CkStringBuilder_Create();
CkHttpResponse_GetBodySb(resp,sbResponseBody);

jResp := CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,sbResponseBody);
CkJsonObject_putEmitCompact(jResp,False);

Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(CkJsonObject__emit(jResp));

respStatusCode := CkHttpResponse_getStatusCode(resp);
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
  begin
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(CkHttpResponse__header(resp));
    Memo1.Lines.Add('Failed.');
    CkHttpResponse_Dispose(resp);
    Exit;
  end;
CkHttpResponse_Dispose(resp);

// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)

// {
//   "apiName": "Account",
//   "childRelationships": {},
//   "eTag": "1be6f040e46732e79a0999d6fea9fe7d",
//   "fields": {
//     "AccountNumber": {
//       "displayValue": null,
//       "value": null
//     },
//     "Active__c": {
//       "displayValue": null,
//       "value": null
//     },
//     "AnnualRevenue": {
//       "displayValue": null,
//       "value": null
//     },
//     "BillingCity": {
//       "displayValue": null,
//       "value": null
//     },
//     "BillingCountry": {
//       "displayValue": null,
//       "value": null
//     },
//     "BillingPostalCode": {
//       "displayValue": null,
//       "value": null
//     },
//     "BillingState": {
//       "displayValue": null,
//       "value": null
//     },
//     "BillingStreet": {
//       "displayValue": null,
//       "value": null
//     },
//     "CreatedBy": {
//       "displayValue": "Philippe Ozil",
//       "value": {
//         "apiName": "User",
//         "childRelationships": {},
//         "eTag": "cc07f7ef1b08ddbd75074c69512dd388",
//         "fields": {
//           "Id": {
//             "displayValue": null,
//             "value": "005B0000003TOI6IAO"
//           },
//           "Name": {
//             "displayValue": null,
//             "value": "Philippe Ozil"
//           }
//         },
//         "id": "005B0000003TOI6IAO",
//         "lastModifiedById": "005B0000003TOI6IAO",
//         "lastModifiedDate": "2023-02-02T10:32:12.000Z",
//         "recordTypeId": null,
//         "recordTypeInfo": null,
//         "systemModstamp": "2023-09-27T15:47:51.000Z",
//         "weakEtag": 1695829671000
//       }
//     },
//     "CreatedById": {
//       "displayValue": null,
//       "value": "005B0000003TOI6IAO"
//     },
//     "CreatedDate": {
//       "displayValue": "27/09/2023 18:01",
//       "value": "2023-09-27T16:01:14.000Z"
//     },
//     "CustomerPriority__c": {
//       "displayValue": null,
//       "value": null
//     },
//     "Description": {
//       "displayValue": null,
//       "value": null
//     },
//     "Fax": {
//       "displayValue": null,
//       "value": null
//     },
//     "Industry": {
//       "displayValue": null,
//       "value": null
//     },
//     "LastModifiedBy": {
//       "displayValue": "Philippe Ozil",
//       "value": {
//         "apiName": "User",
//         "childRelationships": {},
//         "eTag": "cc07f7ef1b08ddbd75074c69512dd388",
//         "fields": {
//           "Id": {
//             "displayValue": null,
//             "value": "005B0000003TOI6IAO"
//           },
//           "Name": {
//             "displayValue": null,
//             "value": "Philippe Ozil"
//           }
//         },
//         "id": "005B0000003TOI6IAO",
//         "lastModifiedById": "005B0000003TOI6IAO",
//         "lastModifiedDate": "2023-02-02T10:32:12.000Z",
//         "recordTypeId": null,
//         "recordTypeInfo": null,
//         "systemModstamp": "2023-09-27T15:47:51.000Z",
//         "weakEtag": 1695829671000
//       }
//     },
//     "LastModifiedById": {
//       "displayValue": null,
//       "value": "005B0000003TOI6IAO"
//     },
//     "LastModifiedDate": {
//       "displayValue": "27/09/2023 18:04",
//       "value": "2023-09-27T16:04:41.000Z"
//     },
//     "Name": {
//       "displayValue": null,
//       "value": "My Renamed Account"
//     },
//     "NumberOfEmployees": {
//       "displayValue": null,
//       "value": null
//     },
//     "NumberofLocations__c": {
//       "displayValue": null,
//       "value": null
//     },
//     "Owner": {
//       "displayValue": "Philippe Ozil",
//       "value": {
//         "apiName": "User",
//         "childRelationships": {},
//         "eTag": "cc07f7ef1b08ddbd75074c69512dd388",
//         "fields": {
//           "Id": {
//             "displayValue": null,
//             "value": "005B0000003TOI6IAO"
//           },
//           "Name": {
//             "displayValue": null,
//             "value": "Philippe Ozil"
//           }
//         },
//         "id": "005B0000003TOI6IAO",
//         "lastModifiedById": "005B0000003TOI6IAO",
//         "lastModifiedDate": "2023-02-02T10:32:12.000Z",
//         "recordTypeId": null,
//         "recordTypeInfo": null,
//         "systemModstamp": "2023-09-27T15:47:51.000Z",
//         "weakEtag": 1695829671000
//       }
//     },
//     "OwnerId": {
//       "displayValue": null,
//       "value": "005B0000003TOI6IAO"
//     },
//     "Ownership": {
//       "displayValue": null,
//       "value": null
//     },
//     "Parent": {
//       "displayValue": null,
//       "value": null
//     },
//     "ParentId": {
//       "displayValue": null,
//       "value": null
//     },
//     "Phone": {
//       "displayValue": null,
//       "value": null
//     },
//     "Rating": {
//       "displayValue": null,
//       "value": null
//     },
//     "SLAExpirationDate__c": {
//       "displayValue": null,
//       "value": null
//     },
//     "SLASerialNumber__c": {
//       "displayValue": null,
//       "value": null
//     },
//     "SLA__c": {
//       "displayValue": null,
//       "value": null
//     },
//     "ShippingCity": {
//       "displayValue": null,
//       "value": null
//     },
//     "ShippingCountry": {
//       "displayValue": null,
//       "value": null
//     },
//     "ShippingPostalCode": {
//       "displayValue": null,
//       "value": null
//     },
//     "ShippingState": {
//       "displayValue": null,
//       "value": null
//     },
//     "ShippingStreet": {
//       "displayValue": null,
//       "value": null
//     },
//     "Sic": {
//       "displayValue": null,
//       "value": null
//     },
//     "Site": {
//       "displayValue": null,
//       "value": null
//     },
//     "TickerSymbol": {
//       "displayValue": null,
//       "value": null
//     },
//     "Type": {
//       "displayValue": null,
//       "value": null
//     },
//     "UpsellOpportunity__c": {
//       "displayValue": null,
//       "value": null
//     },
//     "Website": {
//       "displayValue": null,
//       "value": null
//     }
//   },
//   "id": "0011Q00002Z2P5jQAF",
//   "lastModifiedById": "005B0000003TOI6IAO",
//   "lastModifiedDate": "2023-09-27T16:04:41.000Z",
//   "recordTypeId": "012000000000000AAA",
//   "recordTypeInfo": null,
//   "systemModstamp": "2023-09-27T16:04:41.000Z",
//   "weakEtag": 1695830681000
// }

// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

apiName := CkJsonObject__stringOf(jResp,'apiName');
eTag := CkJsonObject__stringOf(jResp,'eTag');
DisplayValue := CkJsonObject__stringOf(jResp,'fields.AccountNumber.displayValue');
Value := CkJsonObject__stringOf(jResp,'fields.AccountNumber.value');
Active__cDisplayValue := CkJsonObject__stringOf(jResp,'fields.Active__c.displayValue');
Active__cValue := CkJsonObject__stringOf(jResp,'fields.Active__c.value');
AnnualRevenueDisplayValue := CkJsonObject__stringOf(jResp,'fields.AnnualRevenue.displayValue');
AnnualRevenueValue := CkJsonObject__stringOf(jResp,'fields.AnnualRevenue.value');
BillingCityDisplayValue := CkJsonObject__stringOf(jResp,'fields.BillingCity.displayValue');
BillingCityValue := CkJsonObject__stringOf(jResp,'fields.BillingCity.value');
BillingCountryDisplayValue := CkJsonObject__stringOf(jResp,'fields.BillingCountry.displayValue');
BillingCountryValue := CkJsonObject__stringOf(jResp,'fields.BillingCountry.value');
BillingPostalCodeDisplayValue := CkJsonObject__stringOf(jResp,'fields.BillingPostalCode.displayValue');
BillingPostalCodeValue := CkJsonObject__stringOf(jResp,'fields.BillingPostalCode.value');
BillingStateDisplayValue := CkJsonObject__stringOf(jResp,'fields.BillingState.displayValue');
BillingStateValue := CkJsonObject__stringOf(jResp,'fields.BillingState.value');
BillingStreetDisplayValue := CkJsonObject__stringOf(jResp,'fields.BillingStreet.displayValue');
BillingStreetValue := CkJsonObject__stringOf(jResp,'fields.BillingStreet.value');
CreatedByDisplayValue := CkJsonObject__stringOf(jResp,'fields.CreatedBy.displayValue');
ApiName := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.apiName');
ETag := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.eTag');
IdDisplayValue := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.fields.Id.displayValue');
IdValue := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.fields.Id.value');
NameDisplayValue := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.fields.Name.displayValue');
NameValue := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.fields.Name.value');
Id := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.id');
LastModifiedById := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.lastModifiedById');
LastModifiedDate := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.lastModifiedDate');
RecordTypeId := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.recordTypeId');
RecordTypeInfo := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.recordTypeInfo');
SystemModstamp := CkJsonObject__stringOf(jResp,'fields.CreatedBy.value.systemModstamp');
WeakEtag := CkJsonObject_IntOf(jResp,'fields.CreatedBy.value.weakEtag');
CreatedByIdDisplayValue := CkJsonObject__stringOf(jResp,'fields.CreatedById.displayValue');
CreatedByIdValue := CkJsonObject__stringOf(jResp,'fields.CreatedById.value');
CreatedDateDisplayValue := CkJsonObject__stringOf(jResp,'fields.CreatedDate.displayValue');
CreatedDateValue := CkJsonObject__stringOf(jResp,'fields.CreatedDate.value');
CustomerPriority__cDisplayValue := CkJsonObject__stringOf(jResp,'fields.CustomerPriority__c.displayValue');
CustomerPriority__cValue := CkJsonObject__stringOf(jResp,'fields.CustomerPriority__c.value');
DescriptionDisplayValue := CkJsonObject__stringOf(jResp,'fields.Description.displayValue');
DescriptionValue := CkJsonObject__stringOf(jResp,'fields.Description.value');
FaxDisplayValue := CkJsonObject__stringOf(jResp,'fields.Fax.displayValue');
FaxValue := CkJsonObject__stringOf(jResp,'fields.Fax.value');
IndustryDisplayValue := CkJsonObject__stringOf(jResp,'fields.Industry.displayValue');
IndustryValue := CkJsonObject__stringOf(jResp,'fields.Industry.value');
LastModifiedByDisplayValue := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.displayValue');
ValueApiName := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.apiName');
ValueETag := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.eTag');
IdDisplayValue := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.fields.Id.displayValue');
IdValue := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.fields.Id.value');
NameDisplayValue := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.fields.Name.displayValue');
NameValue := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.fields.Name.value');
ValueId := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.id');
ValueLastModifiedById := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.lastModifiedById');
ValueLastModifiedDate := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.lastModifiedDate');
ValueRecordTypeId := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.recordTypeId');
ValueRecordTypeInfo := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.recordTypeInfo');
ValueSystemModstamp := CkJsonObject__stringOf(jResp,'fields.LastModifiedBy.value.systemModstamp');
ValueWeakEtag := CkJsonObject_IntOf(jResp,'fields.LastModifiedBy.value.weakEtag');
LastModifiedByIdDisplayValue := CkJsonObject__stringOf(jResp,'fields.LastModifiedById.displayValue');
LastModifiedByIdValue := CkJsonObject__stringOf(jResp,'fields.LastModifiedById.value');
LastModifiedDateDisplayValue := CkJsonObject__stringOf(jResp,'fields.LastModifiedDate.displayValue');
LastModifiedDateValue := CkJsonObject__stringOf(jResp,'fields.LastModifiedDate.value');
NameDisplayValue := CkJsonObject__stringOf(jResp,'fields.Name.displayValue');
NameValue := CkJsonObject__stringOf(jResp,'fields.Name.value');
NumberOfEmployeesDisplayValue := CkJsonObject__stringOf(jResp,'fields.NumberOfEmployees.displayValue');
NumberOfEmployeesValue := CkJsonObject__stringOf(jResp,'fields.NumberOfEmployees.value');
NumberofLocations__cDisplayValue := CkJsonObject__stringOf(jResp,'fields.NumberofLocations__c.displayValue');
NumberofLocations__cValue := CkJsonObject__stringOf(jResp,'fields.NumberofLocations__c.value');
OwnerDisplayValue := CkJsonObject__stringOf(jResp,'fields.Owner.displayValue');
ValueApiName := CkJsonObject__stringOf(jResp,'fields.Owner.value.apiName');
ValueETag := CkJsonObject__stringOf(jResp,'fields.Owner.value.eTag');
IdDisplayValue := CkJsonObject__stringOf(jResp,'fields.Owner.value.fields.Id.displayValue');
IdValue := CkJsonObject__stringOf(jResp,'fields.Owner.value.fields.Id.value');
NameDisplayValue := CkJsonObject__stringOf(jResp,'fields.Owner.value.fields.Name.displayValue');
NameValue := CkJsonObject__stringOf(jResp,'fields.Owner.value.fields.Name.value');
ValueId := CkJsonObject__stringOf(jResp,'fields.Owner.value.id');
ValueLastModifiedById := CkJsonObject__stringOf(jResp,'fields.Owner.value.lastModifiedById');
ValueLastModifiedDate := CkJsonObject__stringOf(jResp,'fields.Owner.value.lastModifiedDate');
ValueRecordTypeId := CkJsonObject__stringOf(jResp,'fields.Owner.value.recordTypeId');
ValueRecordTypeInfo := CkJsonObject__stringOf(jResp,'fields.Owner.value.recordTypeInfo');
ValueSystemModstamp := CkJsonObject__stringOf(jResp,'fields.Owner.value.systemModstamp');
ValueWeakEtag := CkJsonObject_IntOf(jResp,'fields.Owner.value.weakEtag');
OwnerIdDisplayValue := CkJsonObject__stringOf(jResp,'fields.OwnerId.displayValue');
OwnerIdValue := CkJsonObject__stringOf(jResp,'fields.OwnerId.value');
OwnershipDisplayValue := CkJsonObject__stringOf(jResp,'fields.Ownership.displayValue');
OwnershipValue := CkJsonObject__stringOf(jResp,'fields.Ownership.value');
ParentDisplayValue := CkJsonObject__stringOf(jResp,'fields.Parent.displayValue');
ParentValue := CkJsonObject__stringOf(jResp,'fields.Parent.value');
ParentIdDisplayValue := CkJsonObject__stringOf(jResp,'fields.ParentId.displayValue');
ParentIdValue := CkJsonObject__stringOf(jResp,'fields.ParentId.value');
PhoneDisplayValue := CkJsonObject__stringOf(jResp,'fields.Phone.displayValue');
PhoneValue := CkJsonObject__stringOf(jResp,'fields.Phone.value');
RatingDisplayValue := CkJsonObject__stringOf(jResp,'fields.Rating.displayValue');
RatingValue := CkJsonObject__stringOf(jResp,'fields.Rating.value');
SLAExpirationDate__cDisplayValue := CkJsonObject__stringOf(jResp,'fields.SLAExpirationDate__c.displayValue');
SLAExpirationDate__cValue := CkJsonObject__stringOf(jResp,'fields.SLAExpirationDate__c.value');
SLASerialNumber__cDisplayValue := CkJsonObject__stringOf(jResp,'fields.SLASerialNumber__c.displayValue');
SLASerialNumber__cValue := CkJsonObject__stringOf(jResp,'fields.SLASerialNumber__c.value');
SLA__cDisplayValue := CkJsonObject__stringOf(jResp,'fields.SLA__c.displayValue');
SLA__cValue := CkJsonObject__stringOf(jResp,'fields.SLA__c.value');
ShippingCityDisplayValue := CkJsonObject__stringOf(jResp,'fields.ShippingCity.displayValue');
ShippingCityValue := CkJsonObject__stringOf(jResp,'fields.ShippingCity.value');
ShippingCountryDisplayValue := CkJsonObject__stringOf(jResp,'fields.ShippingCountry.displayValue');
ShippingCountryValue := CkJsonObject__stringOf(jResp,'fields.ShippingCountry.value');
ShippingPostalCodeDisplayValue := CkJsonObject__stringOf(jResp,'fields.ShippingPostalCode.displayValue');
ShippingPostalCodeValue := CkJsonObject__stringOf(jResp,'fields.ShippingPostalCode.value');
ShippingStateDisplayValue := CkJsonObject__stringOf(jResp,'fields.ShippingState.displayValue');
ShippingStateValue := CkJsonObject__stringOf(jResp,'fields.ShippingState.value');
ShippingStreetDisplayValue := CkJsonObject__stringOf(jResp,'fields.ShippingStreet.displayValue');
ShippingStreetValue := CkJsonObject__stringOf(jResp,'fields.ShippingStreet.value');
SicDisplayValue := CkJsonObject__stringOf(jResp,'fields.Sic.displayValue');
SicValue := CkJsonObject__stringOf(jResp,'fields.Sic.value');
SiteDisplayValue := CkJsonObject__stringOf(jResp,'fields.Site.displayValue');
SiteValue := CkJsonObject__stringOf(jResp,'fields.Site.value');
TickerSymbolDisplayValue := CkJsonObject__stringOf(jResp,'fields.TickerSymbol.displayValue');
TickerSymbolValue := CkJsonObject__stringOf(jResp,'fields.TickerSymbol.value');
TypeDisplayValue := CkJsonObject__stringOf(jResp,'fields.Type.displayValue');
TypeValue := CkJsonObject__stringOf(jResp,'fields.Type.value');
UpsellOpportunity__cDisplayValue := CkJsonObject__stringOf(jResp,'fields.UpsellOpportunity__c.displayValue');
UpsellOpportunity__cValue := CkJsonObject__stringOf(jResp,'fields.UpsellOpportunity__c.value');
WebsiteDisplayValue := CkJsonObject__stringOf(jResp,'fields.Website.displayValue');
WebsiteValue := CkJsonObject__stringOf(jResp,'fields.Website.value');
id := CkJsonObject__stringOf(jResp,'id');
lastModifiedById := CkJsonObject__stringOf(jResp,'lastModifiedById');
lastModifiedDate := CkJsonObject__stringOf(jResp,'lastModifiedDate');
recordTypeId := CkJsonObject__stringOf(jResp,'recordTypeId');
recordTypeInfo := CkJsonObject__stringOf(jResp,'recordTypeInfo');
systemModstamp := CkJsonObject__stringOf(jResp,'systemModstamp');
weakEtag := CkJsonObject_IntOf(jResp,'weakEtag');

CkHttp_Dispose(http);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: application/json"
	-d '{
    "allowSaveOnDuplicate": false,
    "fields": {
        "FieldAPIName": "FieldValue"
    }
}'
https://domain.com/services/data/v{{version}}/ui-api/records/:RECORD_ID

Postman Collection Item JSON

{
  "name": "Update a Record",
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "PATCH",
    "header": [
      {
        "key": "Content-Type",
        "type": "text",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"allowSaveOnDuplicate\": false,\n    \"fields\": {\n        \"FieldAPIName\": \"FieldValue\"\n    }\n}"
    },
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/ui-api/records/:RECORD_ID",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "ui-api",
        "records",
        ":RECORD_ID"
      ],
      "variable": [
        {
          "key": "RECORD_ID",
          "value": "",
          "description": "Record ID"
        }
      ]
    },
    "description": "Update a record's data.\nUser Interface API enforces Salesforce validation rules. If a validation rule fails, the response is an Error with Output.\n\nWhen you make a PATCH request to update a record, make sure that the record hasn’t changed since the user started editing it. To find out whether it’s safe to save a record, pass the If-Modified-Since HTTP header in the request.\n\nAs of API version 43.0, if you pass read-only fields in a request body, the response is an Error with Output."
  },
  "response": [
    {
      "name": "Update a Record",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"allowSaveOnDuplicate\": false,\n    \"fields\": {\n        \"Name\": \"My Renamed Account\"\n    }\n}"
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/ui-api/records/:RECORD_ID",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "ui-api",
            "records",
            ":RECORD_ID"
          ],
          "variable": [
            {
              "key": "RECORD_ID",
              "value": "0011Q00002Z2P5jQAF",
              "description": "Record ID"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Wed, 27 Sep 2023 16:04:41 GMT"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000; includeSubDomains"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "X-Robots-Tag",
          "value": "none"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache,must-revalidate,max-age=0,no-store,private"
        },
        {
          "key": "ETag",
          "value": "\"1be6f040e46732e79a0999d6fea9fe7d\""
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=UTF-8"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"apiName\": \"Account\",\n    \"childRelationships\": {},\n    \"eTag\": \"1be6f040e46732e79a0999d6fea9fe7d\",\n    \"fields\": {\n        \"AccountNumber\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Active__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"AnnualRevenue\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingCity\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingCountry\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingPostalCode\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingState\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingStreet\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"CreatedBy\": {\n            \"displayValue\": \"Philippe Ozil\",\n            \"value\": {\n                \"apiName\": \"User\",\n                \"childRelationships\": {},\n                \"eTag\": \"cc07f7ef1b08ddbd75074c69512dd388\",\n                \"fields\": {\n                    \"Id\": {\n                        \"displayValue\": null,\n                        \"value\": \"005B0000003TOI6IAO\"\n                    },\n                    \"Name\": {\n                        \"displayValue\": null,\n                        \"value\": \"Philippe Ozil\"\n                    }\n                },\n                \"id\": \"005B0000003TOI6IAO\",\n                \"lastModifiedById\": \"005B0000003TOI6IAO\",\n                \"lastModifiedDate\": \"2023-02-02T10:32:12.000Z\",\n                \"recordTypeId\": null,\n                \"recordTypeInfo\": null,\n                \"systemModstamp\": \"2023-09-27T15:47:51.000Z\",\n                \"weakEtag\": 1695829671000\n            }\n        },\n        \"CreatedById\": {\n            \"displayValue\": null,\n            \"value\": \"005B0000003TOI6IAO\"\n        },\n        \"CreatedDate\": {\n            \"displayValue\": \"27/09/2023 18:01\",\n            \"value\": \"2023-09-27T16:01:14.000Z\"\n        },\n        \"CustomerPriority__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Description\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Fax\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Industry\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"LastModifiedBy\": {\n            \"displayValue\": \"Philippe Ozil\",\n            \"value\": {\n                \"apiName\": \"User\",\n                \"childRelationships\": {},\n                \"eTag\": \"cc07f7ef1b08ddbd75074c69512dd388\",\n                \"fields\": {\n                    \"Id\": {\n                        \"displayValue\": null,\n                        \"value\": \"005B0000003TOI6IAO\"\n                    },\n                    \"Name\": {\n                        \"displayValue\": null,\n                        \"value\": \"Philippe Ozil\"\n                    }\n                },\n                \"id\": \"005B0000003TOI6IAO\",\n                \"lastModifiedById\": \"005B0000003TOI6IAO\",\n                \"lastModifiedDate\": \"2023-02-02T10:32:12.000Z\",\n                \"recordTypeId\": null,\n                \"recordTypeInfo\": null,\n                \"systemModstamp\": \"2023-09-27T15:47:51.000Z\",\n                \"weakEtag\": 1695829671000\n            }\n        },\n        \"LastModifiedById\": {\n            \"displayValue\": null,\n            \"value\": \"005B0000003TOI6IAO\"\n        },\n        \"LastModifiedDate\": {\n            \"displayValue\": \"27/09/2023 18:04\",\n            \"value\": \"2023-09-27T16:04:41.000Z\"\n        },\n        \"Name\": {\n            \"displayValue\": null,\n            \"value\": \"My Renamed Account\"\n        },\n        \"NumberOfEmployees\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"NumberofLocations__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Owner\": {\n            \"displayValue\": \"Philippe Ozil\",\n            \"value\": {\n                \"apiName\": \"User\",\n                \"childRelationships\": {},\n                \"eTag\": \"cc07f7ef1b08ddbd75074c69512dd388\",\n                \"fields\": {\n                    \"Id\": {\n                        \"displayValue\": null,\n                        \"value\": \"005B0000003TOI6IAO\"\n                    },\n                    \"Name\": {\n                        \"displayValue\": null,\n                        \"value\": \"Philippe Ozil\"\n                    }\n                },\n                \"id\": \"005B0000003TOI6IAO\",\n                \"lastModifiedById\": \"005B0000003TOI6IAO\",\n                \"lastModifiedDate\": \"2023-02-02T10:32:12.000Z\",\n                \"recordTypeId\": null,\n                \"recordTypeInfo\": null,\n                \"systemModstamp\": \"2023-09-27T15:47:51.000Z\",\n                \"weakEtag\": 1695829671000\n            }\n        },\n        \"OwnerId\": {\n            \"displayValue\": null,\n            \"value\": \"005B0000003TOI6IAO\"\n        },\n        \"Ownership\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Parent\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ParentId\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Phone\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Rating\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"SLAExpirationDate__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"SLASerialNumber__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"SLA__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingCity\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingCountry\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingPostalCode\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingState\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingStreet\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Sic\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Site\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"TickerSymbol\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Type\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"UpsellOpportunity__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Website\": {\n            \"displayValue\": null,\n            \"value\": null\n        }\n    },\n    \"id\": \"0011Q00002Z2P5jQAF\",\n    \"lastModifiedById\": \"005B0000003TOI6IAO\",\n    \"lastModifiedDate\": \"2023-09-27T16:04:41.000Z\",\n    \"recordTypeId\": \"012000000000000AAA\",\n    \"recordTypeInfo\": null,\n    \"systemModstamp\": \"2023-09-27T16:04:41.000Z\",\n    \"weakEtag\": 1695830681000\n}"
    }
  ]
}