Skip to content

Instantly share code, notes, and snippets.

View MaceWindu1's full-sized avatar
😂

František Čapek MaceWindu1

😂
View GitHub Profile
@MaceWindu1
MaceWindu1 / filterSubgrid.ts
Last active October 28, 2019 15:43
Filter Subgrid
async function filterTagsSubgrid(executionContext: any): Promise<void> {
try {
var formContext: any = executionContext.getFormContext();
}
catch (e) {
var formContext: any = executionContext;
};
var formType: number = formContext.ui.getFormType();
var values: any = [0, 1, 4, 6];
async function CloseOpportunity(inputParameters : any) : Promise<void> {
var opportunityclose : any = {
"opportunityid@odata.bind": "/opportunities" + inputParameters.opportunityId.replace("{", "(").replace("}", ")"),
"@odata.type": "Microsoft.Dynamics.CRM.opportunityclose",
"actualrevenue": 0,
"actualend": new Date(),
"description": inputParameters.description
}
var loseOpportunityRequest : any = {