diff --git a/pages/api/file/createrepinvolvement_api.js b/pages/api/file/createrepinvolvement_api.js index 545f34ea..cd059683 100644 --- a/pages/api/file/createrepinvolvement_api.js +++ b/pages/api/file/createrepinvolvement_api.js @@ -43,9 +43,11 @@ export default async function ApiProxy(req, res) { console.log(req.body, queryUrl); var crmUrl = "https://" + process.env.CRMURL; + var crmVersion = process.env.CRMURL_VERSION; var data = { - "@odata.id": crmUrl + "/api/data/v8.2/contacts(" + contactid + ")", + "@odata.id": + crmUrl + "/api/data/" + crmVersion + "/contacts(" + contactid + ")", }; var config = {