-
Notifications
You must be signed in to change notification settings - Fork 1
EnvironmentVariable
Niels Steenbeek edited this page Jul 16, 2021
·
2 revisions
hso-d365 generate EnvironmentVariable
CLI Command 'generate EnvironmentVariable' generates a folder EnvironmentVariable.
Following files will be generated:
- src/EnvironmentVariable/EnvironmentVariable.service.ts
- src/EnvironmentVariable/EnvironmentVariable.model.ts
This is a service class similar as generated for Entities. It contains the Solution Environment Variables getters.
export class EnvironmentVariableService {
// Method generated for you
public static async getYourEnvVar(): Promise<string> {
// logic generated for you
}
//
}
static async onLoad(executionContext: Xrm.Events.EventContext): Promise<void> {
const myVar = await EnvironmentVariableService.getYourEnvVar();
}
This is a model class similar as generated for Entities. You don't have to look into this one.
Use command
hso-d365 generate EnvironmentVariable --help