mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Microsoft Dynamics CRM Node): Add support for other regions than North America (#3157)
* Typo * Added all dynamics regions * Change uri to match credentials region * ⚡ Small improvement Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@ import {
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export async function microsoftApiRequest(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
const credenitals = await this.getCredentials('microsoftDynamicsOAuth2Api') as { subdomain: string };
|
||||
const credentials = await this.getCredentials('microsoftDynamicsOAuth2Api') as { subdomain: string, region: string };
|
||||
|
||||
let options: OptionsWithUri = {
|
||||
headers: {
|
||||
@@ -27,7 +27,7 @@ export async function microsoftApiRequest(this: IExecuteFunctions | IExecuteSing
|
||||
method,
|
||||
body,
|
||||
qs,
|
||||
uri: uri || `https://${credenitals.subdomain}.crm.dynamics.com/api/data/v9.2${resource}`,
|
||||
uri: uri || `https://${credentials.subdomain}.${credentials.region}/api/data/v9.2${resource}`,
|
||||
json: true,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user