diff --git a/entity/MSTTeamMember_entity/MSTTeamMember_entity.aod b/entity/MSTTeamMember_entity/MSTTeamMember_entity.aod index 72dead10e1dc47cf5fe80fb31d4493667fd40677..1f1e68f496fa64090a7ddcdb33ef5aad5634e607 100644 --- a/entity/MSTTeamMember_entity/MSTTeamMember_entity.aod +++ b/entity/MSTTeamMember_entity/MSTTeamMember_entity.aod @@ -94,6 +94,7 @@ <mandatoryProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/role/mandatoryProcess.js</mandatoryProcess> <dropDownProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/role/dropDownProcess.js</dropDownProcess> <stateProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/role/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/role/valueProcess.js</valueProcess> </entityField> <entityField> <name>INVITE</name> @@ -101,6 +102,7 @@ <mandatoryProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/invite/mandatoryProcess.js</mandatoryProcess> <dropDownProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/invite/dropDownProcess.js</dropDownProcess> <stateProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/invite/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/MSTTeamMember_entity/entityfields/invite/valueProcess.js</valueProcess> </entityField> <entityProvider> <name>#PROVIDER_AGGREGATES</name> diff --git a/entity/MSTTeamMember_entity/entityfields/invite/valueProcess.js b/entity/MSTTeamMember_entity/entityfields/invite/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ed9e6312969780d3a2d8a791bf78c23bbb453f1e --- /dev/null +++ b/entity/MSTTeamMember_entity/entityfields/invite/valueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); + +if (vars.get("$this.value") == null) + result.string(false); \ No newline at end of file diff --git a/entity/MSTTeamMember_entity/entityfields/role/valueProcess.js b/entity/MSTTeamMember_entity/entityfields/role/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..4abbf36fdb805dcfb19158974e995e0f61b1a7ad --- /dev/null +++ b/entity/MSTTeamMember_entity/entityfields/role/valueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); + +if (vars.get("$this.value") == null) + result.string("member"); \ No newline at end of file diff --git a/entity/MSTTeam_entity/recordcontainers/jdito/onInsert.js b/entity/MSTTeam_entity/recordcontainers/jdito/onInsert.js index 8a1c6e0c83d6d16ef62ed23cb2594be121eb5a0f..f83629a566c5be1a4203a786f8e96ac86d48ab82 100644 --- a/entity/MSTTeam_entity/recordcontainers/jdito/onInsert.js +++ b/entity/MSTTeam_entity/recordcontainers/jdito/onInsert.js @@ -1,3 +1,4 @@ +import("system.logging"); import("Util_lib"); import("Communication_lib"); import("Sql_lib"); @@ -15,6 +16,7 @@ var teamMembers = vars.get("$field.TeamMembers.insertedRows"); var ownerIds = []; var internalMembers = []; var externalMembers = []; +logging.log(JSON.stringify(teamMembers, null, "\t")); teamMembers.forEach(function (teamMember) { var contactId = teamMember["CONTACT_ID"]; @@ -54,13 +56,14 @@ if (description) groupConfig.setDescription(description); var teamConfig = teams.createTeamConfig(); -var mstTeam = teams.createTeam(groupConfig, teamConfig); +logging.log(JSON.stringify(ownerIds)) +//var mstTeam = teams.createTeam(groupConfig, teamConfig); +// +//if (internalMembers.length !== 0) +// teams.addInternalMembers(mstTeam.teamId, internalMembers); +// +//if (externalMembers.length !== 0) +// teams.addExternalMembers(mstTeam.teamId, externalMembers); -if (internalMembers.length !== 0) - teams.addInternalMembers(mstTeam.teamId, internalMembers); - -if (externalMembers.length !== 0) - teams.addExternalMembers(mstTeam.teamId, externalMembers); - -MSTeamsUtils.insertTeamIfMissing(mstTeam); -MSTeamsUtils.createTeamLink(mstTeam.teamId, vars.get("$param.ObjectRowId_param"), vars.get("$param.ObjectType_param")); \ No newline at end of file +//MSTeamsUtils.insertTeamIfMissing(mstTeam); +//MSTeamsUtils.createTeamLink(mstTeam.teamId, vars.get("$param.ObjectRowId_param"), vars.get("$param.ObjectType_param")); \ No newline at end of file