Add lookup record with external header in node js sdk
I am trying to add one record with an external id. That custom module has a lookup field and I want to add that lookup value as an external id. I have tried it with API and it worked but not working with Nodejs SDK. Below is code.
let record = new ZCRMRecord();
record.addKeyValue("Name", "Google");
record.addKeyValue("Organization_Size", 10);
record.addKeyValue("Organization_Id", "03dff895-7aa3-4c9f-a0fe-a6eeb9282d67");
let ownerName = new ZCRMRecord();
ownerName.addKeyValue("User_Id", "03dff895-7aa3-4c9f-a0fe-a6eeb9282d18");
record.addKeyValue("Owner_Name", ownerName);
recordsArray.push(record);
request.setData(recordsArray);
let headerInstance = new HeaderMap();
await headerInstance.add(CreateRecordsHeader.X_EXTERNAL, "vOrganizations.Owner_Name.User_Id");
await headerInstance.add(CreateRecordsHeader.X_EXTERNAL, "vOrganizations.Organization_Id");
//Call createRecords method that takes BodyWrapper instance and moduleAPIName as parameters
let response = await recordOperations.createRecords(moduleAPIName, request, headerInstance);