RE: Setting Regarding field in Activity entity using Javascript.
Check code snippet for your reference..
let updateactivity = {
"RegardingObjectId@odata.bind":"/syscm_cases("+case_ID+")",
};
console.log("case_ID id "+case_ID);
console.log("entity id "+entityId);
console.log("before window update");
const result_activity = await window.parent.opener.Xrm.WebApi.updateRecord("activitypointer",entityId,updateactivity);
I'm using this code inside HTML web resource