Difference between revisions of "ConversionMethods"
(36 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:CGScript]] | [[Category:CGScript]] | ||
+ | Catglobe system has been using two types of Ids at the same time, that causes a lot of confusion. | ||
+ | |||
+ | Therefore, need cleaning up to keep only one type of Id. Some methods will be obsolete and should update to use another one. | ||
+ | |||
+ | Please refer conversion table below for detail: | ||
{| class="tableintopic" style="border-collapse: collapse; width: 1350px;" cellpadding="2" | {| class="tableintopic" style="border-collapse: collapse; width: 1350px;" cellpadding="2" | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
Line 7: | Line 12: | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[updateUserPermission|updateUserPermission(resourceId, | + | | style="border: 1px solid;" | [[updateUserPermission|updateUserPermission(resourceId, permissionUsers)]] |
− | | style="border: 1px solid;" | [[updateUserResourceIdPermission|updateUserResourceIdPermission(resourceId, | + | <source lang="javascript"> |
+ | number resourceId = 17148446; | ||
+ | number userId1 = 5895442; | ||
+ | number userId2 = 5898785; | ||
+ | array permissionUsers = {{userId1, "Read"}, {userId2, "FullControl"}}; | ||
+ | updateUserPermission(resourceId, permissionUsers); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[updateUserResourceIdPermission|updateUserResourceIdPermission(resourceId, permissionUsers)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceId = 17148446; | ||
+ | number userId1 = 12702700; | ||
+ | number userId2 = 12706043; | ||
+ | Dictionary permissionUsers = {userId1: "Read", userId2: "FullControl"}; | ||
+ | updateUserResourceIdPermission(resourceId, permissionUsers); | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[QAS_class|QAS.UserId]] | | style="border: 1px solid;" | [[QAS_class|QAS.UserId]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 5895442; | ||
+ | number qasId = 193213312; | ||
+ | QAS qas = new QAS (qasId); | ||
+ | qas.UserId = userId; | ||
+ | qas.Save(); | ||
+ | print(qas.UserId); | ||
+ | </source> | ||
| style="border: 1px solid;" | [[QAS_class|QAS.UserResourceId]] | | style="border: 1px solid;" | [[QAS_class|QAS.UserResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 12702700; | ||
+ | number qasId = 193213312; | ||
+ | QAS qas = new QAS (qasId); | ||
+ | qas.UserResourceId = userId; | ||
+ | qas.Save(); | ||
+ | print(qas.UserResourceId); | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
Line 27: | Line 62: | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[sendBulkMail|sendBulkMail(bulkMailId, maxToSend)]] | + | | style="border: 1px solid;" | [[sendBulkMail|sendBulkMail(bulkMailId[, maxToSend])]] |
− | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.Send()]]< | + | <source lang="javascript"> |
+ | number bulkMailId = 21063; | ||
+ | sendBulkMail(bulkMailId); | ||
+ | </source> | ||
+ | <br> | ||
+ | <br> | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21063; | ||
+ | number maxToSend = 100; | ||
+ | sendBulkMail(bulkMailId, maxToSend); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.Send()]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148200; | ||
+ | BulkMail bm = new BulkMail(bulkMailId); | ||
+ | bm.Send();// return Cattask Instance Id | ||
+ | </source> | ||
+ | [[BulkMail_class|BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148200; | ||
+ | number maxToSend = 100; | ||
+ | bool isTest = false; | ||
+ | bool isSyncronious = false; | ||
+ | BulkMail bm = new BulkMail(bulkMailId); | ||
+ | bm.SendBulkMail(maxToSend, isTest, isSyncronious) | ||
+ | </source> | ||
| style="border: 1px solid;" | New class BulkMail | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[sendBulkMailSyncronious|sendBulkMailSyncronious(bulkMailId, maxToSend)]] | + | | style="border: 1px solid;" | [[sendBulkMailSyncronious|sendBulkMailSyncronious(bulkMailId[, maxToSend])]] |
− | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.SendSyncronious()]] < | + | <source lang="javascript"> |
+ | number bulkMailId = 21063; | ||
+ | sendBulkMailSyncronious(bulkMailId); | ||
+ | </source> | ||
+ | <br> | ||
+ | <br> | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21063; | ||
+ | number maxToSend = 100; | ||
+ | sendBulkMailSyncronious(bulkMailId, maxToSend); | ||
+ | </source> | ||
+ | |||
+ | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.SendSyncronious()]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148200; | ||
+ | BulkMail bm = new BulkMail(bulkMailId); | ||
+ | bm.SendSyncronious();//return number of sent | ||
+ | </source> | ||
+ | [[BulkMail_class|BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148200; | ||
+ | number maxToSend = 100; | ||
+ | bool isTest = false; | ||
+ | bool isSyncronious = true; | ||
+ | BulkMail bm = new BulkMail(bulkMailId); | ||
+ | bm.SendBulkMail(maxToSend, isTest, isSyncronious) | ||
+ | </source> | ||
| style="border: 1px solid;" | New class BulkMail | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[sendTestBulkMail|sendTestBulkMail(bulkMailId, maxToSend)]] | + | | style="border: 1px solid;" | [[sendTestBulkMail|sendTestBulkMail(bulkMailId[, maxToSend])]] |
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21063; | ||
+ | sendTestBulkMail(bulkMailId); | ||
+ | </source> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21063; | ||
+ | number maxToSend = 100; | ||
+ | sendTestBulkMail(bulkMailId, maxToSend); | ||
+ | </source> | ||
| style="border: 1px solid;" | [[BulkMail_class|BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious)]] | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148200; | ||
+ | number maxToSend = -1; | ||
+ | bool isTest = true; | ||
+ | bool isSyncronious = false; | ||
+ | BulkMail bm = new BulkMail(bulkMailId); | ||
+ | bm.SendBulkMail(maxToSend, isTest, isSyncronious) | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148200; | ||
+ | number maxToSend = 100; | ||
+ | bool isTest = true; | ||
+ | bool isSyncronious = false; | ||
+ | BulkMail bm = new BulkMail(bulkMailId); | ||
+ | bm.SendBulkMail(maxToSend, isTest, isSyncronious) | ||
+ | </source> | ||
| style="border: 1px solid;" | New class BulkMail | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[sendTestBulkMailSyncronious|sendTestBulkMailSyncronious(bulkMailId, maxToSend)]] | + | | style="border: 1px solid;" | [[sendTestBulkMailSyncronious|sendTestBulkMailSyncronious(bulkMailId[, maxToSend])]] |
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21063; | ||
+ | sendTestBulkMailSyncronious(bulkMailId); | ||
+ | </source> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21063; | ||
+ | number maxToSend = 100; | ||
+ | sendTestBulkMailSyncronious(bulkMailId, maxToSend); | ||
+ | </source> | ||
| style="border: 1px solid;" | [[BulkMail_class|BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious)]] | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148200; | ||
+ | number maxToSend = -1; | ||
+ | bool isTest = true; | ||
+ | bool isSyncronious = true; | ||
+ | BulkMail bm = new BulkMail(bulkMailId); | ||
+ | bm.SendBulkMail(maxToSend, isTest, isSyncronious) | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148200; | ||
+ | number maxToSend = 100; | ||
+ | bool isTest = true; | ||
+ | bool isSyncronious = true; | ||
+ | BulkMail bm = new BulkMail(bulkMailId); | ||
+ | bm.SendBulkMail(maxToSend, isTest, isSyncronious) | ||
+ | </source> | ||
| style="border: 1px solid;" | New class BulkMail | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[ | + | | style="border: 1px solid;" | [[setBulkMailFromResource|setBulkMailFromResource(bulkMailId, resourceId)]] |
− | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.From]] | + | <source lang="javascript"> |
− | | style="border: 1px solid;" | New class BulkMail (BulkMail.From | + | number bulkMailId = 21065; |
+ | number resourceId = 17145420; | ||
+ | |||
+ | setBulkMailFromResource(bulkMailId, resourceId); | ||
+ | |||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.From = value]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148449; | ||
+ | number resourceId = 17145420; | ||
+ | BulkMail bm = new BulkMail (bulkMailId); | ||
+ | bm.From = new EmailAccount(0, resourceId); | ||
+ | bm.Save(); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | New class BulkMail | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" | [[setBulkMailFromGlobalEmailAlias|setBulkMailFromGlobalEmailAlias(bulkMailId, globalEmailId)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21065; | ||
+ | number globalEmailId = 16238; | ||
+ | |||
+ | setBulkMailFromGlobalEmailAlias(bulkMailId,globalEmailId); | ||
+ | |||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.From = value]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148449; | ||
+ | number globalEmailId = 16238; | ||
+ | BulkMail bm = new BulkMail (bulkMailId); | ||
+ | bm.From = new EmailAccount(1, globalEmailId); | ||
+ | bm.Save(); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[ | + | | style="border: 1px solid;" | [[setBulkMailFromWebshop|setBulkMailFromWebshop(bulkMailId)]] |
− | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.From]] | + | <source lang="javascript"> |
− | | style="border: 1px solid;" | New class BulkMail | + | number bulkMailId = 21065; |
+ | |||
+ | setBulkMailFromWebshop(bulkMailId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.From = value]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148449; | ||
+ | BulkMail bm = new BulkMail (bulkMailId); | ||
+ | bm.From = new EmailAccount(2); | ||
+ | bm.Save(); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[setBulkMailFromSupport|setBulkMailFromSupport(bulkMailId)]] | | style="border: 1px solid;" | [[setBulkMailFromSupport|setBulkMailFromSupport(bulkMailId)]] | ||
− | + | <source lang="javascript"> | |
− | + | number bulkMailId = 21065; | |
− | + | setBulkMailFromSupport(bulkMailId); | |
− | | style="border: 1px solid;" | [[ | + | </source> |
− | + | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.From = value]] | |
− | | style="border: 1px solid;" | New class BulkMail | + | <source lang="javascript"> |
+ | number bulkMailId = 17148449; | ||
+ | BulkMail bm = new BulkMail (bulkMailId); | ||
+ | bm.From = new EmailAccount(3); | ||
+ | bm.Save(); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[setBulkMailGroups|setBulkMailGroups(bulkMailId, groupIds)]] | | style="border: 1px solid;" | [[setBulkMailGroups|setBulkMailGroups(bulkMailId, groupIds)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21065; | ||
+ | array groupIds = {84129, 84130}; | ||
+ | setBulkMailGroups(bulkMailId, groupIds) | ||
+ | </source> | ||
| style="border: 1px solid;" | [[BulkMail_class|BulkMail.SetGroups(groupIds)]] | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.SetGroups(groupIds)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148449; | ||
+ | array groupIds = {17146562, 17146563}; | ||
+ | BulkMail bm = new BulkMail (bulkMailId); | ||
+ | bm.SetGroups(groupIds) | ||
+ | </source> | ||
| style="border: 1px solid;" | New class BulkMail | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[setBulkMailGroupsToBeRebuilt|setBulkMailGroupsToBeRebuilt(bulkMailId, groupIds)]] | | style="border: 1px solid;" | [[setBulkMailGroupsToBeRebuilt|setBulkMailGroupsToBeRebuilt(bulkMailId, groupIds)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21065; | ||
+ | array groupIds = {84129, 84130}; | ||
+ | setBulkMailGroupsToBeRebuilt(bulkMailId, groupIds) | ||
+ | </source> | ||
| style="border: 1px solid;" | [[BulkMail_class|BulkMail.SetGroupsToBeRebuilt(groupIds)]] | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.SetGroupsToBeRebuilt(groupIds)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148449; | ||
+ | array groupIds = {17146562, 17146563}; | ||
+ | BulkMail bm = new BulkMail (bulkMailId); | ||
+ | bm.SetGroupsToBeRebuilt(groupIds) | ||
+ | </source> | ||
+ | |||
| style="border: 1px solid;" | New class BulkMail | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[setBulkMailUsers|setBulkMailUsers(bulkMailId, userIds)]] | | style="border: 1px solid;" | [[setBulkMailUsers|setBulkMailUsers(bulkMailId, userIds)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 21065; | ||
+ | array userIds = {5895442, 5898785}; | ||
+ | setBulkMailUsers(bulkMailId, userIds); | ||
+ | </source> | ||
| style="border: 1px solid;" | [[BulkMail_class|BulkMail.SetUsers(userIds)]] | | style="border: 1px solid;" | [[BulkMail_class|BulkMail.SetUsers(userIds)]] | ||
+ | <source lang="javascript"> | ||
+ | number bulkMailId = 17148449; | ||
+ | array userIds = {12702700, 12706043}; | ||
+ | BulkMail bm = new BulkMail (bulkMailId); | ||
+ | bm.SetUsers(userIds); | ||
+ | </source> | ||
| style="border: 1px solid;" | New class BulkMail | | style="border: 1px solid;" | New class BulkMail | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[-addToGroup|addToGroup(groupId)]] | + | | style="border: 1px solid;" | [[-addToGroup|addToGroup(groupId)]] |
− | | style="border: 1px solid;" | [[Group_addUser|Group_addUser(QAS_getCurrentQAS().UserResourceId, groupId) | + | <source lang="javascript"> |
+ | //run on QAS context | ||
+ | number groupId = 84129; | ||
+ | addToGroup(groupId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[Group_addUser|Group_addUser(userId, groupId)]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number groupId = 17146562; | ||
+ | number userId = QAS_getCurrentQAS().UserResourceId; | ||
+ | Group_addUser(userId, groupId); | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[removeFromGroup|removeFromGroup(groupId)]] | | style="border: 1px solid;" | [[removeFromGroup|removeFromGroup(groupId)]] | ||
− | | style="border: 1px solid;" | [[Group_removeUser|Group_removeUser(QAS_getCurrentQAS().UserResourceId, groupId) | + | <source lang="javascript"> |
+ | //run on QAS context | ||
+ | number groupId = 84129; | ||
+ | removeFromGroup(groupId) | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[Group_removeUser|Group_removeUser(userId, groupId)]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number groupId = 17146562; | ||
+ | number userId = QAS_getCurrentQAS().UserResourceId; | ||
+ | Group_removeUser(userId, groupId) | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[questionnaireAnswerSheetExists|questionnaireAnswerSheetExists(qnaireId[, userId])]] | | style="border: 1px solid; width: 510.117px;" | [[questionnaireAnswerSheetExists|questionnaireAnswerSheetExists(qnaireId[, userId])]] | ||
+ | <source lang="javascript"> | ||
+ | number qnaireId = 619; | ||
+ | number userId = 5895442; | ||
+ | questionnaireAnswerSheetExists(qnaireId, userId); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 619; | ||
+ | questionnaireAnswerSheetExists(qnaireId); | ||
+ | </source> | ||
| style="border: 1px solid; width: 370.7px;" | [[QAS_exists|QAS_exists(qnaireId, userId)]] | | style="border: 1px solid; width: 370.7px;" | [[QAS_exists|QAS_exists(qnaireId, userId)]] | ||
+ | <source lang="javascript"> | ||
+ | number qnaireId = 11560690; | ||
+ | number userId = 12702700; | ||
+ | QAS_exists(qnaireId, userId); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 11560690; | ||
+ | number userId = QAS_getCurrentQAS().UserResourceId; | ||
+ | QAS_exists(qnaireId, userId); | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[createUserProjectQuestionnaire|createUserProjectQuestionnaire(qnaireId[, assignCurrentUser, useExisting])]] | | style="border: 1px solid;" | [[createUserProjectQuestionnaire|createUserProjectQuestionnaire(qnaireId[, assignCurrentUser, useExisting])]] | ||
− | | style="border: 1px solid;" | [[QAS_class|new QAS(qnaireId, userId)]] < | + | <source lang="javascript"> |
+ | number qnaireId = 619; | ||
+ | |||
+ | createUserProjectQuestionnaire(qnaireId); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 619; | ||
+ | bool assignCurrentUser = true; | ||
+ | createUserProjectQuestionnaire(qnaireId, assignCurrentUser); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 619; | ||
+ | bool assignCurrentUser = true; | ||
+ | bool useExisting = true; | ||
+ | createUserProjectQuestionnaire(qnaireId, assignCurrentUser, useExisting); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[QAS_class|new QAS(qnaireId, userId)]] | ||
+ | <source lang="javascript"> | ||
+ | number qnaireId = 11560690; | ||
+ | number userId = -1;// force no user | ||
+ | new QAS(qnaireId, userId).Save(); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 11560690; | ||
+ | number userId = 0;// use current user | ||
+ | new QAS(qnaireId, userId).Save(); | ||
+ | </source> | ||
+ | [[QAS_getByUserResourceId|QAS_getByUserResourceId(userId, qnaireId, createIfNone)]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 11560690; | ||
+ | number userId = 0;// use current user | ||
+ | bool createIfNone = false; | ||
+ | QAS_getByUserResourceId(userId, qnaireId, createIfNone)[0].Id; | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[createResourceProjectQuestionnaire|createResourceProjectQuestionnaire(qnaireId[, assignCurrentUser, useExisting])]] | | style="border: 1px solid; width: 510.117px;" | [[createResourceProjectQuestionnaire|createResourceProjectQuestionnaire(qnaireId[, assignCurrentUser, useExisting])]] | ||
− | | style="border: 1px solid | + | <source lang="javascript"> |
− | | style="border: 1px solid | + | number qnaireId = 619; |
+ | createResourceProjectQuestionnaire(qnaireId); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 619; | ||
+ | bool assignCurrentUser = true; | ||
+ | createResourceProjectQuestionnaire(qnaireId, assignCurrentUser); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 619; | ||
+ | bool assignCurrentUser = true; | ||
+ | bool useExisting = true; | ||
+ | createResourceProjectQuestionnaire(qnaireId, assignCurrentUser, useExisting); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[QAS_class|new QAS(qnaireId, userId)]] | ||
+ | <source lang="javascript"> | ||
+ | number qnaireId = 11560690; | ||
+ | number userId = -1;// force no user | ||
+ | new QAS(qnaireId, userId).Save(); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 11560690; | ||
+ | number userId = 0;// use current user | ||
+ | new QAS(qnaireId, userId).Save(); | ||
+ | </source> | ||
+ | [[QAS_getByUserResourceId|QAS_getByUserResourceId(userId, qnaireId, createIfNone)]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number qnaireId = 11560690; | ||
+ | number userId = 0;// use current user | ||
+ | bool createIfNone = false; | ||
+ | QAS_getByUserResourceId(userId, qnaireId, createIfNone)[0].Id; | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[groupExists|groupExists(groupId)]] | | style="border: 1px solid;" | [[groupExists|groupExists(groupId)]] | ||
+ | <source lang="javascript"> | ||
+ | number groupId = 84129; | ||
+ | groupExists(groupId); | ||
+ | //true/false | ||
+ | </source> | ||
+ | [[groupExists|groupExists(qualifiedName)]] | ||
+ | <source lang="javascript"> | ||
+ | string qualifiedName = "My project\\My group"; | ||
+ | groupExists(qualifiedName); | ||
+ | //true/false | ||
+ | </source> | ||
| style="border: 1px solid;" | [[Group_getGroupByResourceId|Group_getGroupByResourceId(groupId)]] | | style="border: 1px solid;" | [[Group_getGroupByResourceId|Group_getGroupByResourceId(groupId)]] | ||
+ | <source lang="javascript"> | ||
+ | number groupId = 17146562; | ||
+ | Group_getGroupByResourceId(groupId); | ||
+ | //return group object if found or empty if not found | ||
+ | </source> | ||
+ | [[Group_getGroupByName|Group_getGroupByName(qualifiedName)]] | ||
+ | <source lang="javascript"> | ||
+ | string qualifiedName = "My project\\My group"; | ||
+ | Group_getGroupByName(qualifiedName); | ||
+ | //return group object if found or empty if not found | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[isMemberOfGroup|isMemberOfGroup(userId, groupId)]] | | style="border: 1px solid;" | [[isMemberOfGroup|isMemberOfGroup(userId, groupId)]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 5895442; | ||
+ | number groupId = 84129; | ||
+ | isMemberOfGroup(userId, groupId) | ||
+ | </source> | ||
+ | [[isMemberOfGroup|isMemberOfGroup(userId, groupName)]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 5895442; | ||
+ | string groupName = "My project\\My group"; | ||
+ | isMemberOfGroup(userId, groupName); | ||
+ | </source> | ||
+ | [[isMemberOfGroup|isMemberOfGroup(groupId)]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAs context | ||
+ | number groupId = 84129; | ||
+ | isMemberOfGroup(groupId) | ||
+ | </source> | ||
+ | [[isMemberOfGroup|isMemberOfGroup(groupName)]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAs context | ||
+ | string groupName = "My project\\My group"; | ||
+ | isMemberOfGroup(groupName) | ||
+ | </source> | ||
| style="border: 1px solid;" | [[Group_isMemberOfGroup|Group_isMemberOfGroup(userId, groupId)]] | | style="border: 1px solid;" | [[Group_isMemberOfGroup|Group_isMemberOfGroup(userId, groupId)]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 12702700; | ||
+ | number groupId = 17146562; | ||
+ | Group_isMemberOfGroup(userId, groupId); | ||
+ | </source> | ||
+ | <br> | ||
+ | <source lang="javascript"> | ||
+ | number userId = 12702700; | ||
+ | string groupName = "My project\\My group"; | ||
+ | number groupId = Group_getGroupByName(groupName)[GROUP_RESOURCE_ID]; | ||
+ | Group_isMemberOfGroup(userId, groupId); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAs context | ||
+ | number userId = QAS_getCurrentQAS().UserResourceId; | ||
+ | number groupId = 17146562; | ||
+ | Group_isMemberOfGroup(userId, groupId); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAs context | ||
+ | number userId = QAS_getCurrentQAS().UserResourceId; | ||
+ | string groupName = "My project\\My group"; | ||
+ | number groupId = Group_getGroupByName(groupName)[GROUP_RESOURCE_ID]; | ||
+ | Group_isMemberOfGroup(userId, groupId); | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[rebuildGroup|rebuildGroup(groupId)]] | | style="border: 1px solid;" | [[rebuildGroup|rebuildGroup(groupId)]] | ||
+ | <source lang="javascript"> | ||
+ | number groupId = 84129; | ||
+ | rebuildGroup(groupId); | ||
+ | </source> | ||
| style="border: 1px solid;" | [[Group_rebuildGroup|Group_rebuildGroup(groupId,parallelBuild)]] | | style="border: 1px solid;" | [[Group_rebuildGroup|Group_rebuildGroup(groupId,parallelBuild)]] | ||
+ | <source lang="javascript"> | ||
+ | number groupId = 17146562; | ||
+ | bool parallelBuild = true; | ||
+ | Group_rebuildGroup(groupId, parallelBuild); | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[Tabulation_saveAsReport|Tabulation_saveAsReport(name, parentId, permissionGroups[, overwrite])]] | | style="border: 1px solid;" | [[Tabulation_saveAsReport|Tabulation_saveAsReport(name, parentId, permissionGroups[, overwrite])]] | ||
+ | <source lang="javascript"> | ||
+ | DCS_use(16749647); | ||
+ | string name = "Report Test"; | ||
+ | number parentId = 17148135; | ||
+ | number groupId1 = 84129; | ||
+ | number groupId2 = 84130; | ||
+ | array permissionGroups = {{groupId1, "Write"}, {groupId2, "FullControl"}}; | ||
+ | bool overwrite = true; | ||
+ | createCrossDiagram ({"Q1"},{"Q2"}); | ||
+ | Tabulation_saveAsReport(name, parentId, permissionGroups, overwrite); | ||
+ | </source> | ||
+ | |||
| style="border: 1px solid;" | [[Tabulation_class|Tabulation.SaveAsReport(name, parentId, permissionGroups, overwrite)]] | | style="border: 1px solid;" | [[Tabulation_class|Tabulation.SaveAsReport(name, parentId, permissionGroups, overwrite)]] | ||
+ | <source lang="javascript"> | ||
+ | string name = "Report Test"; | ||
+ | number parentId = 17148135; | ||
+ | number groupId1 = 17146562; | ||
+ | number groupId2 = 17146563; | ||
+ | Dictionary permissionGroups = {groupId1: "Write", groupId2: "FullControl"}; | ||
+ | bool overwrite = true; | ||
+ | TabulationDiagramParameter p = new TabulationDiagramParameter (); | ||
+ | Tabulation t = new Tabulation(); | ||
+ | p.DataCache = 16749647; | ||
+ | t.CreateCrossDiagram ({"Q1"},{"Q2"}, p); | ||
+ | t.SaveAsReport(name, parentId, permissionGroups, overwrite); | ||
+ | </source> | ||
| style="border: 1px solid;" | New class Tabulation | | style="border: 1px solid;" | New class Tabulation | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[updateGroupPermission|updateGroupPermission(resourceId, | + | | style="border: 1px solid;" | [[updateGroupPermission|updateGroupPermission(resourceId, permissionGroups)]] |
− | | style="border: 1px solid;" | [[updateGroupResourceIdPermission|updateGroupResourceIdPermission(resourceId, | + | <source lang="javascript"> |
+ | number resourceId = 17148446; | ||
+ | number groupId1 = 84129; | ||
+ | number groupId2 = 84130; | ||
+ | array permissionGroups = {{groupId1, "Write"}, {groupId2, "FullControl"}}; | ||
+ | updateGroupPermission(resourceId, permissionGroups); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[updateGroupResourceIdPermission|updateGroupResourceIdPermission(resourceId, permissionGroups)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceId = 17148446; | ||
+ | number groupId1 = 17146562; | ||
+ | number groupId2 = 17146563; | ||
+ | Dictionary permissionGroups = {groupId1: "Write", groupId2: "FullControl"}; | ||
+ | updateGroupResourceIdPermission(resourceId, permissionGroups); | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[sendMailTemplateFromResource|sendMailTemplateFromResource(parentId, | + | | style="border: 1px solid;" | [[sendMailTemplateFromResource|sendMailTemplateFromResource(parentId, toEmail, alias, mailTemplateId[, fromEmail, callbackMethod])]] |
− | | style="border: 1px solid;" | [[ | + | <source lang="javascript"> |
+ | number mailTemplateId = 6465; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | number parentId = 17148159; | ||
+ | sendMailTemplateFromResource(parentId, toEmail, alias, mailTemplateId) | ||
+ | </source> | ||
+ | <br> | ||
+ | <br> | ||
+ | <source lang="javascript"> | ||
+ | number mailTemplateId = 6465; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | number parentId = 17148159; | ||
+ | EmailAccount fromEmail = new EmailAccount("panel"); | ||
+ | sendMailTemplateFromResource(parentId, toEmail, alias, mailTemplateId, fromEmail) | ||
+ | </source> | ||
+ | <br> | ||
+ | <source lang="javascript"> | ||
+ | number mailTemplateId = 6465; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | number parentId = 17148159; | ||
+ | EmailAccount fromEmail = new EmailAccount("panel"); | ||
+ | object callbackMethod = function (string subject, string message){ | ||
+ | subject = "Test" + getRandomNumber(0,10); | ||
+ | return {subject, message}; | ||
+ | }; | ||
+ | sendMailTemplateFromResource(parentId, toEmail, alias, mailTemplateId, fromEmail, callbackMethod) | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[EmailTemplate_send|EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod)]] | ||
+ | <source lang="javascript"> | ||
+ | number mailTemplateId = 17148149; | ||
+ | bool isTest = false; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | number parentId = 17148159; | ||
+ | string fromEmail = empty; | ||
+ | object callbackMethod = empty; | ||
+ | EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod) | ||
+ | </source> | ||
+ | |||
+ | <source lang="javascript"> | ||
+ | number mailTemplateId = 17148149; | ||
+ | bool isTest = false; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | number parentId = 17148159; | ||
+ | string fromEmail = "panel@..."; | ||
+ | object callbackMethod = empty; | ||
+ | EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod) | ||
+ | </source> | ||
+ | |||
+ | <source lang="javascript"> | ||
+ | number mailTemplateId = 17148149; | ||
+ | bool isTest = false; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | number parentId = 17148159; | ||
+ | string fromEmail = "panel@..."; | ||
+ | object callbackMethod = function (string subject, string message){ | ||
+ | subject = "Test" + getRandomNumber(0,10); | ||
+ | return {subject, message}; | ||
+ | }; | ||
+ | EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod) | ||
+ | </source> | ||
+ | |||
| style="border: 1px solid;" | New method EmailTemplate_send | | style="border: 1px solid;" | New method EmailTemplate_send | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[SendMail_Template|sendMailTemplate(email, alias, mailTemplateId, fromEmail, | + | | style="border: 1px solid;" | [[SendMail_Template|sendMailTemplate(toEmail, alias, mailTemplateId)]] |
− | | style="border: 1px solid;" | [[ | + | <source lang="javascript"> |
+ | //run on QAS context | ||
+ | number mailTemplateId = 6465; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | sendMailTemplate(toEmail, alias, mailTemplateId) | ||
+ | </source> | ||
+ | <br> | ||
+ | [[SendMail_Template|sendMailTemplate(toEmail, alias, mailTemplateId, fromEmail, callbackMethod)]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number mailTemplateId = 6465; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | EmailAccount fromEmail = new EmailAccount("panel"); | ||
+ | object callbackMethod = function (string subject, string message){ | ||
+ | subject = "Test" + getRandomNumber(0,10); | ||
+ | return {subject, message}; | ||
+ | }; | ||
+ | sendMailTemplate(toEmail, alias, mailTemplateId, fromEmail, callbackMethod) | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[EmailTemplate_send|EmailTemplate_send(mailTemplateId, isTest, toEmail, alias)]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number mailTemplateId = 17148149; | ||
+ | bool isTest = false; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | EmailTemplate_send(mailTemplateId, isTest, toEmail, alias) | ||
+ | </source> | ||
+ | [[EmailTemplate_send|EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod)]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number mailTemplateId = 17148149; | ||
+ | bool isTest = false; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | number parentId = empty; | ||
+ | string fromEmail = "panel@..."; | ||
+ | object callbackMethod = function (string subject, string message){ | ||
+ | subject = "Test" + getRandomNumber(0,10); | ||
+ | return {subject, message}; | ||
+ | }; | ||
+ | EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod) | ||
+ | </source> | ||
| style="border: 1px solid;" | New method EmailTemplate_send | | style="border: 1px solid;" | New method EmailTemplate_send | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[sendTestMailTemplate|sendTestMailTemplate( | + | | style="border: 1px solid;" | [[sendTestMailTemplate|sendTestMailTemplate(toEmail, alias, mailTemplateId[, fromEmail, callbackMethod])]] |
− | | style="border: 1px solid;" | [[ | + | <source lang="javascript"> |
+ | //run on QAS context | ||
+ | number mailTemplateId = 6465; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | EmailAccount fromEmail = new EmailAccount("panel"); | ||
+ | object callbackMethod = function (string subject, string message){ | ||
+ | subject = "Test" + getRandomNumber(0,10); | ||
+ | return {subject, message}; | ||
+ | }; | ||
+ | sendTestMailTemplate(toEmail, alias, mailTemplateId, fromEmail, callbackMethod) | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[EmailTemplate_send|EmailTemplate_send(mailTemplateId, isTest, toEmail, alias[, parentId, fromEmail, callbackMethod])]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number mailTemplateId = 17148149; | ||
+ | bool isTest = true; | ||
+ | string toEmail = "email@..."; | ||
+ | string alias = "Alias"; | ||
+ | number parentId = empty; | ||
+ | string fromEmail = "panel@..."; | ||
+ | object callbackMethod = function (string subject, string message){ | ||
+ | subject = "Test" + getRandomNumber(0,10); | ||
+ | return {subject, message}; | ||
+ | }; | ||
+ | EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod) | ||
+ | </source> | ||
| style="border: 1px solid;" | New method EmailTemplate_send | | style="border: 1px solid;" | New method EmailTemplate_send | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[getProjectQuestionnaireName|getProjectQuestionnaireName([qnaireId])]] | | style="border: 1px solid; width: 510.117px;" | [[getProjectQuestionnaireName|getProjectQuestionnaireName([qnaireId])]] | ||
− | | style="border: 1px solid; width: 453.183px;" |[[getProjectQuestionnaireNameByResourceId|getProjectQuestionnaireNameByResourceId( | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 370.7px;" | <br><br>New method Questionnaire_current | + | number qnaireId = 619; |
+ | getProjectQuestionnaireName(qnaireId); | ||
+ | </source> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | getProjectQuestionnaireName(); | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" |[[getProjectQuestionnaireNameByResourceId|getProjectQuestionnaireNameByResourceId(qnaireId)]] | ||
+ | <source lang="javascript"> | ||
+ | number qnaireId = 11560690; | ||
+ | getProjectQuestionnaireNameByResourceId(qnaireId); | ||
+ | </source> | ||
+ | [[Resource_getResourceName|Resource_getResourceName(qniareId)]] | ||
+ | <source lang="javascript"> | ||
+ | number qnaireId = 11560690; | ||
+ | Resource_getResourceName(qnaireId); | ||
+ | </source> | ||
+ | [[Questionnaire_class|Questionnaire_current().QualifiedName]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | Questionnaire_current().QualifiedName; | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | <br><br><br><br><br><br><br><br><br><br><br>New method Questionnaire_current | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[setReportStyleSheetId|setReportStyleSheetId(reportStyleSheetId)]] | | style="border: 1px solid;" | [[setReportStyleSheetId|setReportStyleSheetId(reportStyleSheetId)]] | ||
− | | style="border: 1px solid;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid;" | | + | DCS_use(16749647); |
+ | number reportStyleSheetId = 11060624; | ||
+ | setReportStyleSheetId(getResourceIdFromGuid (getResourceGuid(reportStyleSheetId))); | ||
+ | createCrossDiagram({"Q1"}, {"Q2"}); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[Tabulation_class|Tabulation.StyleSheet = value]] | ||
+ | <source lang="javascript"> | ||
+ | number reportStyleSheetId = 11060624; | ||
+ | TabulationDiagramParameter p = new TabulationDiagramParameter(); | ||
+ | p.DataCacheId = 16749647; | ||
+ | Tabulation t = new Tabulation(); | ||
+ | t.StyleSheet = new ReportStyleSheet(reportStyleSheetId); | ||
+ | t.CreateCrossDiagram({"Q1"}, {"Q2"}, p); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | New Tabulation class <br> New ReportStyleSheet class | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[setUserProjectQuestionnaireUserId|setUserProjectQuestionnaireUserId(userId)]] | | style="border: 1px solid; width: 510.117px;" | [[setUserProjectQuestionnaireUserId|setUserProjectQuestionnaireUserId(userId)]] | ||
− | | style="border: 1px solid; width: 370.7px;" | [[QAS_class|QAS_getCurrentQAS().UserResourceId= | + | <source lang="javascript"> |
+ | //Run on QAS context | ||
+ | number userId = 5895442; | ||
+ | setUserProjectQuestionnaireUserId(userId); | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[QAS_class|QAS.UserResourceId = value]] | ||
+ | <source lang="javascript"> | ||
+ | // run on QAS context | ||
+ | number userId = 12702700; | ||
+ | QAS qas = QAS_getCurrentQAS(); | ||
+ | qas.UserResourceId = userId; | ||
+ | qas.Save(); | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[getUserProjectQuestionnaireUserId|getUserProjectQuestionnaireUserId()]] | | style="border: 1px solid; width: 510.117px;" | [[getUserProjectQuestionnaireUserId|getUserProjectQuestionnaireUserId()]] | ||
− | | style="border: 1px solid; width: 370.7px;" | [[QAS_class|QAS_getCurrentQAS().UserResourceId]] | + | <source lang="javascript"> |
+ | //Run on QAS context | ||
+ | getUserProjectQuestionnaireUserId();//5895442 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[QAS_class|QAS.UserResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | // run on QAS context | ||
+ | QAS_getCurrentQAS().UserResourceId;//12702700 | ||
+ | </source> | ||
+ | [[User_class|User.ResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | // run on QAS context | ||
+ | User_getQasUser().ResourceId;//12702700 | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[setRPQUserId|setRPQUserId(userId)]] | | style="border: 1px solid; width: 510.117px;" | [[setRPQUserId|setRPQUserId(userId)]] | ||
− | | style="border: 1px solid; width: 370.7px;" | [[QAS_class|QAS_getCurrentQAS().UserResourceId= | + | <source lang="javascript"> |
+ | //Run on QAS context | ||
+ | number userId = 5895442; | ||
+ | setRPQUserId(userId); | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[QAS_class|QAS.UserResourceId = value]] | ||
+ | <source lang="javascript"> | ||
+ | // run on QAS context | ||
+ | number userId = 12702700; | ||
+ | QAS qas = QAS_getCurrentQAS(); | ||
+ | qas.UserResourceId = userId; | ||
+ | qas.Save(); | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[add_Journal|addJournal(resourceId, userId, journalType, content)]] | | style="border: 1px solid;" | [[add_Journal|addJournal(resourceId, userId, journalType, content)]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 5895442; | ||
+ | number resourceId = 17148446; | ||
+ | string journalType = "Comment"; | ||
+ | string content = "xxx"; | ||
+ | addJournal(resourceId, userId, journalType, content); | ||
+ | </source> | ||
| style="border: 1px solid;" | [[ResourceJournalEntry_class|new ResourceJournalEntry (resourceId, journalType, content).Save()]] | | style="border: 1px solid;" | [[ResourceJournalEntry_class|new ResourceJournalEntry (resourceId, journalType, content).Save()]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceId = 17148446; | ||
+ | string journalType = "Comment"; | ||
+ | string content = "xxx"; | ||
+ | new ResourceJournalEntry (resourceId, journalType, content).Save(); | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[getTimezone|getTimezone([userId])]] | | style="border: 1px solid; width: 510.117px;" | [[getTimezone|getTimezone([userId])]] | ||
− | | style="border: 1px solid; width: 370.7px;" | [[User_class|User_getUserByResourceId( | + | <source lang="javascript"> |
+ | number userId = 5895442; | ||
+ | getTimezone(userId); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | // run on QAS context | ||
+ | getTimezone(); | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[User_class|User.TimezoneId]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 12702700; | ||
+ | User_getUserByResourceId(userId).TimezoneId; | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | // run on QAS context | ||
+ | User_getQasUser().TimezoneId; | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid; width: 510.117px;" | [[setTimezone|setTimezone([userId,] timezoneId)]] | + | | style="border: 1px solid; width: 510.117px;" | [[setTimezone|setTimezone([userId,] timezoneId)]] |
− | | style="border: 1px solid; width: 370.7px;" | [[User_class|User_getUserByResourceId( | + | <source lang="javascript"> |
+ | number userId = 5895442; | ||
+ | number timezoneId = 40; | ||
+ | setTimezone(userId, timezoneId); | ||
+ | </source> | ||
+ | <br> | ||
+ | <source lang="javascript"> | ||
+ | // run on QAS context | ||
+ | number timezoneId = 40; | ||
+ | setTimezone(timezoneId); | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[User_class|User.TimezoneId = value]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 12702700; | ||
+ | number timezoneId = 40; | ||
+ | User user = User_getUserByResourceId(userId); | ||
+ | user.TimezoneId = timezoneId; | ||
+ | user.Save(); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | // run on QAS context | ||
+ | number timezoneId = 40; | ||
+ | User user = User_getQasUser(); | ||
+ | user.TimezoneId = timezoneId; | ||
+ | user.Save(); | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid; width: 510.117px;" | [[setUserRoleId|setUserRoleId(userId, | + | | style="border: 1px solid; width: 510.117px;" | [[setUserRoleId|setUserRoleId(userId, resourceTemplateId)]] |
− | | style="border: 1px solid; width: 370.7px;" | [[setResourceTemplateResourceId|setResourceTemplateResourceId(userId, resourceTemplateId)]] < | + | <source lang="javascript"> |
+ | number userId = 5895442; | ||
+ | number resourceTemplateId = 6; | ||
+ | setUserRoleId(userId, resourceTemplateId); | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[setResourceTemplateResourceId|setResourceTemplateResourceId(userId, resourceTemplateId)]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 12702700; | ||
+ | number resourceTemplateId = 1847; | ||
+ | setResourceTemplateResourceId(userId, resourceTemplateId); | ||
+ | </source> | ||
+ | [[User_class|User.ResourceTemplateResourceId = value]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 12702700; | ||
+ | number resourceTemplateId = 1847; | ||
+ | User_getUserByResourceId(userId).ResourceTemplateResourceId = resourceTemplateId; | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[getUserRoleId|getUserRoleId(userId)]] | | style="border: 1px solid; width: 510.117px;" | [[getUserRoleId|getUserRoleId(userId)]] | ||
− | | style="border: 1px solid; width: 370.7px;" | [[getResourceTemplateResourceId|getResourceTemplateResourceId(userId)]] < | + | <source lang="javascript"> |
+ | number userId = 5895442; | ||
+ | getUserRoleId(userId);//6 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[getResourceTemplateResourceId|getResourceTemplateResourceId(userId)]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 12702700; | ||
+ | getResourceTemplateResourceId(userId);//1847 | ||
+ | </source> | ||
+ | [[User_class|User.ResourceTemplateResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | number userId = 12702700; | ||
+ | User_getUserByResourceId(userId).ResourceTemplateResourceId;//1847 | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[isMemberOfSampleRule|isMemberOfSampleRule([userId,] sampleRuleId)]] | + | | style="border: 1px solid;" |[[isMemberOfSampleRule|isMemberOfSampleRule([userId,] sampleRuleId)]] |
− | | style="border: 1px solid;" | [[User_isMemberOfSampleRule|User_isMemberOfSampleRule(userId, sampleRuleId)]] | + | <source lang="javascript"> |
− | | style="border: 1px solid;" | New method User_isMemberOfSampleRule | + | number sampleRuleId = 125991; |
+ | number userId = 5895442; | ||
+ | isMemberOfSampleRule(userId, sampleRuleId); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number sampleRuleId = 125991; | ||
+ | isMemberOfSampleRule(sampleRuleId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |[[User_isMemberOfSampleRule|User_isMemberOfSampleRule(userId, sampleRuleId)]] | ||
+ | <source lang="javascript"> | ||
+ | number sampleRuleId = 125991; | ||
+ | number userId = 12702700; | ||
+ | User_isMemberOfSampleRule(userId, sampleRuleId); | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | number sampleRuleId = 125991 ; | ||
+ | number userId = QAS_getCurrentQAS().UserResourceId; | ||
+ | User_isMemberOfSampleRule(userId, sampleRuleId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |New method User_isMemberOfSampleRule | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[EmailTemplate_class|EmailTemplate.PrimaryKey]] | | style="border: 1px solid;" | [[EmailTemplate_class|EmailTemplate.PrimaryKey]] | ||
+ | <source lang="javascript"> | ||
+ | string name = "test"; | ||
+ | number parentId = 17148446; | ||
+ | EmailTemplate e = new EmailTemplate (name, parentId); | ||
+ | e.Save(); | ||
+ | print(e.PrimaryKey);//6468 | ||
+ | </source> | ||
| style="border: 1px solid;" | [[EmailTemplate_class|EmailTemplate.ResourceId]] | | style="border: 1px solid;" | [[EmailTemplate_class|EmailTemplate.ResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | string name = "test"; | ||
+ | number parentId = 17148446; | ||
+ | EmailTemplate e = new EmailTemplate (name, parentId); | ||
+ | e.Save(); | ||
+ | print(e.ResourceId);//17148467 | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[UserQuarantine_class|UserQuarantine.QuarantineResourceId]] | + | | style="border: 1px solid;" | [[UserQuarantine_class|UserQuarantine.QuarantineResourceId]] |
− | | style="border: 1px solid;" | [[UserQuarantine_class|UserQuarantine.QuarantineResourceId]] | + | <source lang="javascript"> |
+ | number userId= 12706043; | ||
+ | array quarantineHistory = Quarantine_getUserHistory(userId); | ||
+ | UserQuarantine q = quarantineHistory[0]; | ||
+ | q.QuarantineResourceId;//1 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[UserQuarantine_class|UserQuarantine.QuarantineResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | number userId= 12706043; | ||
+ | array quarantineHistory = Quarantine_getUserHistory(userId); | ||
+ | UserQuarantine q = quarantineHistory[0]; | ||
+ | q.QuarantineResourceId;//15550519 | ||
+ | </source> | ||
+ | |||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[User_class|User.PrimaryKey]] | | style="border: 1px solid;" | [[User_class|User.PrimaryKey]] | ||
+ | <source lang="javascript"> | ||
+ | User user = User_getLoggedInUser(); | ||
+ | user.PrimaryKey;//5895442 | ||
+ | </source> | ||
| style="border: 1px solid;" | [[User_class|User.ResourceId]] | | style="border: 1px solid;" | [[User_class|User.ResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | User user = User_getLoggedInUser(); | ||
+ | user.ResourceId;//12702700 | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[getQuestionnaireTemplateId|getQuestionnaireTemplateId(qualifiedName)]] | | style="border: 1px solid; width: 510.117px;" | [[getQuestionnaireTemplateId|getQuestionnaireTemplateId(qualifiedName)]] | ||
− | | style="border: 1px solid; width: 370.7px;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 453.183px;" | | + | string qualifiedName = "Common resources\\Panel Questionnaire Template"; |
+ | getQuestionnaireTemplateId(qualifiedName);//536 | ||
+ | </source> | ||
+ | |||
+ | | style="border: 1px solid; width: 370.7px;" | [[QuestionnaireTemplate_class|new QuestionnaireTemplate(qualifiedName).Id]] | ||
+ | <source lang="javascript"> | ||
+ | string qualifiedName = "Common resources\\Panel Questionnaire Template"; | ||
+ | new QuestionnaireTemplate(qualifiedName).Id;//11560689 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" | New class QuestionnaireTemplate | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[getProjectQuestionnaireId|getProjectQuestionnaireId(qualifiedName)]] | | style="border: 1px solid; width: 510.117px;" | [[getProjectQuestionnaireId|getProjectQuestionnaireId(qualifiedName)]] | ||
+ | <source lang="javascript"> | ||
+ | string qualifiedName = "Common resources\\Ad Hoc 178"; | ||
+ | getProjectQuestionnaireId(qualifiedName);//619 | ||
+ | </source> | ||
| style="border: 1px solid; width: 370.7px;" | [[Questionnaire_class|new Questionnaire(qualifiedName).Id]] | | style="border: 1px solid; width: 370.7px;" | [[Questionnaire_class|new Questionnaire(qualifiedName).Id]] | ||
+ | <source lang="javascript"> | ||
+ | string qualifiedName = "Common resources\\Ad Hoc 178"; | ||
+ | new Questionnaire(qualifiedName).Id;//11560690 | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | New class Questionnaire | | style="border: 1px solid; width: 453.183px;" | New class Questionnaire | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[getReturnToProjectQuestionnaireId|getReturnToProjectQuestionnaireId()]] | | style="border: 1px solid; width: 510.117px;" | [[getReturnToProjectQuestionnaireId|getReturnToProjectQuestionnaireId()]] | ||
− | | style="border: 1px solid; width: 370.7px;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 453.183px;" | | + | // run on QAS context |
+ | getReturnToProjectQuestionnaireId();//619 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" |[[GetReturnToQuestionnaireId|GetReturnToQuestionnaireId()]] | ||
+ | <source lang="javascript"> | ||
+ | // run on QAS context | ||
+ | GetReturnToQuestionnaireId();//11560690 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" | New method GetReturnToQuestionnaireId | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid; width: 510.117px;" | [[getReportStyleSheetIdByName|getReportStyleSheetIdByName( | + | | style="border: 1px solid; width: 510.117px;" | [[getReportStyleSheetIdByName|getReportStyleSheetIdByName(qualifiedName)]] |
− | | style="border: 1px solid; width: 370.7px;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 453.183px;" | | + | string qualifiedName = "Common resources\\Tabulation Standard Report Stylesheet"; |
+ | getReportStyleSheetIdByName(qualifiedName);//45 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[ReportStyleSheet_class|new ReportStyleSheet(qualifiedName).Id]] | ||
+ | <source lang="javascript"> | ||
+ | string qualifiedName = "Common resources\\Tabulation Standard Report Stylesheet"; | ||
+ | new ReportStyleSheet(qualifiedName).Id;//11060624 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" | New class ReportStyleSheet | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[getReportStyleSheetId|getReportStyleSheetId()]] | | style="border: 1px solid; width: 510.117px;" | [[getReportStyleSheetId|getReportStyleSheetId()]] | ||
− | | style="border: 1px solid; width: 370.7px;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 453.183px;" | | + | DCS_use(16749647); |
+ | number reportStyleSheetId = 11060624; | ||
+ | setReportStyleSheetId(getResourceIdFromGuid (getResourceGuid(reportStyleSheetId))); | ||
+ | createCrossDiagram({"Q1"}, {"Q2"}); | ||
+ | getReportStyleSheetId();//45 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[Tabulation_class|Tabulation.StyleSheet]] | ||
+ | <source lang="javascript"> | ||
+ | number reportStyleSheetId = 11060624; | ||
+ | TabulationDiagramParameter p = new TabulationDiagramParameter(); | ||
+ | p.DataCacheId = 16749647; | ||
+ | Tabulation t = new Tabulation(); | ||
+ | t.StyleSheet = new ReportStyleSheet(reportStyleSheetId); | ||
+ | t.CreateCrossDiagram({"Q1"}, {"Q2"}, p); | ||
+ | t.StyleSheet;//11060624 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" | New class Tabulation <br> New class ReportStyleSheet | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[getResourceIdFromGuid|getResourceIdFromGuid(guid)]] | | style="border: 1px solid;" | [[getResourceIdFromGuid|getResourceIdFromGuid(guid)]] | ||
+ | <source lang="javascript"> | ||
+ | string guid = "xxx"; | ||
+ | getResourceIdFromGuid(guid);//619 | ||
+ | </source> | ||
| style="border: 1px solid;" | [[getResourceUniqueIdFromGuid|getResourceUniqueIdFromGuid(guid)]] | | style="border: 1px solid;" | [[getResourceUniqueIdFromGuid|getResourceUniqueIdFromGuid(guid)]] | ||
+ | <source lang="javascript"> | ||
+ | string guid = "xxx"; | ||
+ | getResourceUniqueIdFromGuid(guid);//11560690 | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[Task_new|task[TASK_CASE_NUMBER]]] | + | | style="border: 1px solid;" |[[getResourceGuid|getResourceGuid(Resource_Type_, resourceId)]] |
+ | <source lang="javascript"> | ||
+ | number resourceId = 619; | ||
+ | getResourceGuid(Resource_Type_Questionnaire, resourceId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |[[getResourceGuid|getResourceGuid(resourceId)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceId = 11560690; | ||
+ | getResourceGuid(resourceId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |This function is obsolete with 2 parameters, only implemented for questionnaire and PQ, others resource type will throw error | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" | [[Task_new|task[TASK_CASE_NUMBER]]] | ||
+ | <source lang="javascript"> | ||
+ | string taskName = "test"; | ||
+ | number parentId = 17148446; | ||
+ | string taskDescription = "Test"; | ||
+ | number resourceTemplateId = 2072; | ||
+ | array t = Task_new(taskName, parentId, taskDescription, resourceTemplateId); | ||
+ | Task_save(t); | ||
+ | print(t[TASK_CASE_NUMBER]);//62 | ||
+ | </source> | ||
| style="border: 1px solid;" | [[Task_new|task[TASK_RESOURCE_ID]]] | | style="border: 1px solid;" | [[Task_new|task[TASK_RESOURCE_ID]]] | ||
+ | <source lang="javascript"> | ||
+ | string taskName = "test"; | ||
+ | number parentId = 17148446; | ||
+ | string taskDescription = "Test"; | ||
+ | number resourceTemplateId = 2072; | ||
+ | array t = Task_new(taskName, parentId, taskDescription, resourceTemplateId); | ||
+ | Task_save(t); | ||
+ | print(t[TASK_RESOURCE_ID]);//17148474 | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[getCurrentUserId|getCurrentUserId()]] | | style="border: 1px solid;" | [[getCurrentUserId|getCurrentUserId()]] | ||
+ | <source lang="javascript"> | ||
+ | getCurrentUserId();//5895442 | ||
+ | </source> | ||
| style="border: 1px solid;" | [[User_getCurrentUser|User_getCurrentUser()]] | | style="border: 1px solid;" | [[User_getCurrentUser|User_getCurrentUser()]] | ||
+ | <source lang="javascript"> | ||
+ | User_getCurrentUser().ResourceId;//12702700 | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[getUserIdFromResourceId|getUserIdFromResourceId(guid)]] | | style="border: 1px solid;" | [[getUserIdFromResourceId|getUserIdFromResourceId(guid)]] | ||
+ | <source lang="javascript"> | ||
+ | string guid = "xxx"; | ||
+ | getUserIdFromResourceId(guid);//5895442 | ||
+ | </source> | ||
| style="border: 1px solid;" | [[getResourceUniqueIdFromGuid|getResourceUniqueIdFromGuid(guid)]] | | style="border: 1px solid;" | [[getResourceUniqueIdFromGuid|getResourceUniqueIdFromGuid(guid)]] | ||
+ | <source lang="javascript"> | ||
+ | string guid = "xxx"; | ||
+ | getResourceUniqueIdFromGuid(guid);//12702700 | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid;" | [[createUser|createUser(userResourceTemplateId)]] | | style="border: 1px solid;" | [[createUser|createUser(userResourceTemplateId)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceTemplateId = 1; | ||
+ | createUser(resourceTemplateId);//5895442 | ||
+ | </source> | ||
| style="border: 1px solid;" | [[User_new|User_new(userResourceTemplateId)]] | | style="border: 1px solid;" | [[User_new|User_new(userResourceTemplateId)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceTemplateId = 1842; | ||
+ | User user = User_new(resourceTemplateId); | ||
+ | user.ParentResourceId = 17148446; | ||
+ | user.Save(); | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid; width: 510.117px;" | [[getRPQUserId|getRPQUserId()]] | + | | style="border: 1px solid; width: 510.117px;" | [[getRPQUserId|getRPQUserId()]] |
− | | style="border: 1px solid; width: 370.7px;" | [[QAS_class|QAS_getCurrentQAS().UserResourceId]] | + | <source lang="javascript"> |
+ | //run on QAS context | ||
+ | getRPQUserId();//5895442 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[QAS_class|QAS.UserResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | QAS_getCurrentQAS().UserResourceId;//12702700 | ||
+ | </source> | ||
+ | [[User_class|User.ResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | //run on QAS context | ||
+ | User_getQasUser().ResourceId;//12702700 | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
− | | style="border: 1px solid;" | [[User_class|User | + | | style="border: 1px solid;" | [[User_class|User.ResourceTemplateId]] |
− | | style="border: 1px solid;" | [[User_class|User | + | <source lang="javascript"> |
+ | User user = User_getLoggedInUser(); | ||
+ | user.ResourceTemplateId;//1 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[User_class|User.ResourceTemplateResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | User user = User_getLoggedInUser(); | ||
+ | user.ResourceTemplateResourceId;//1842 | ||
+ | </source> | ||
| style="border: 1px solid;" | | | style="border: 1px solid;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[UserQuarantine_class|UserQuarantine.AddedByUserId]] | | style="border: 1px solid; width: 510.117px;" | [[UserQuarantine_class|UserQuarantine.AddedByUserId]] | ||
− | | style="border: 1px solid; width: 370.7px;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 453.183px;" | | + | number userId= 12706043; |
+ | array quarantineHistory = Quarantine_getUserHistory(userId); | ||
+ | UserQuarantine q = quarantineHistory[0]; | ||
+ | q.AddedByUserId;//5895442 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[UserQuarantine_class|UserQuarantine.AddedByUserResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | number userId= 12706043; | ||
+ | array quarantineHistory = Quarantine_getUserHistory(userId); | ||
+ | UserQuarantine q = quarantineHistory[0]; | ||
+ | q.AddedByUserResourceId;//12702700 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" | New property UserQuarantine.AddedByUserResourceId | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[UserQuarantine_class|UserQuarantine.RemovedByUserId]] | | style="border: 1px solid; width: 510.117px;" | [[UserQuarantine_class|UserQuarantine.RemovedByUserId]] | ||
− | | style="border: 1px solid; width: 370.7px;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 453.183px;" | | + | number userId= 12706043; |
+ | array quarantineHistory = Quarantine_getUserHistory(userId); | ||
+ | UserQuarantine q = quarantineHistory[0]; | ||
+ | q.RemovedByUserId;//5895442 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[UserQuarantine_class|UserQuarantine.RemovedByUserResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | number userId= 12706043; | ||
+ | array quarantineHistory = Quarantine_getUserHistory(userId); | ||
+ | UserQuarantine q = quarantineHistory[0]; | ||
+ | q.RemovedByUserResourceId;//12702700 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" | New property UserQuarantine.RemovedByUserResourceId | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[Quarantine_getUserIdsOfQuarantined|Quarantine_getUserIdsOfQuarantined(quarantineIdList)]] | | style="border: 1px solid; width: 510.117px;" | [[Quarantine_getUserIdsOfQuarantined|Quarantine_getUserIdsOfQuarantined(quarantineIdList)]] | ||
− | | style="border: 1px solid; width: 370.7px;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 453.183px;" | | + | array quarantineIdList = {15550518,15550519}; |
+ | Quarantine_getUserIdsOfQuarantined(quarantineIdList); | ||
+ | //{5895442,5898785,...} | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[Quarantine_GetUserResourceIdsOfQuarantined|Quarantine_GetUserResourceIdsOfQuarantined(quarantineIdList)]] | ||
+ | <source lang="javascript"> | ||
+ | array quarantineIdList = {15550518,15550519}; | ||
+ | Quarantine_GetUserResourceIdsOfQuarantined(quarantineIdList); | ||
+ | //{12702700,12706043,..} | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" | New method Quarantine_GetUserResourceIdsOfQuarantined | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[User_class|User.CreatedByUserId]] | | style="border: 1px solid; width: 510.117px;" | [[User_class|User.CreatedByUserId]] | ||
− | | style="border: 1px solid; width: 370.7px;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 453.183px;" | | + | User user = User_getLoggedInUser(); |
+ | user.CreatedByUserId;//5895442 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[User_class|User.CreatedByUserResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | User user = User_getLoggedInUser(); | ||
+ | user.CreatedByUserResourceId;//12702700 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" | New property User.CreatedByUserResourceId | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[User_class|User.ModifiedByUserId]] | | style="border: 1px solid; width: 510.117px;" | [[User_class|User.ModifiedByUserId]] | ||
− | | style="border: 1px solid; width: 370.7px;" | | + | <source lang="javascript"> |
− | | style="border: 1px solid; width: 453.183px;" | | + | User user = User_getLoggedInUser(); |
+ | user.ModifiedByUserId;//5895442 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 370.7px;" | [[User_class|User.ModifiedByUserResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | User user = User_getLoggedInUser(); | ||
+ | user.ModifiedByUserResourceId;//12702700 | ||
+ | </source> | ||
+ | | style="border: 1px solid; width: 453.183px;" | New property User.ModifiedByUserResourceId | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[SampleRule_class|SampleRule.QuestionnaireId]] | | style="border: 1px solid; width: 510.117px;" | [[SampleRule_class|SampleRule.QuestionnaireId]] | ||
+ | <source lang="javascript"> | ||
+ | number groupId = 17146562; | ||
+ | array a = SampleRule_getByGroupResourceId(groupId); | ||
+ | SampleRule s = a[0]; | ||
+ | print(s.QuestionnaireId );//619 | ||
+ | </source> | ||
| style="border: 1px solid; width: 370.7px;" | [[SampleRule_class|SampleRule.QuestionnaireResourceId ]] | | style="border: 1px solid; width: 370.7px;" | [[SampleRule_class|SampleRule.QuestionnaireResourceId ]] | ||
+ | <source lang="javascript"> | ||
+ | number groupId = 17146562; | ||
+ | array a = SampleRule_getByGroupResourceId(groupId); | ||
+ | SampleRule s = a[0]; | ||
+ | print(s.QuestionnaireResourceId );//11560690 | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
|- valign="top" align="left" | |- valign="top" align="left" | ||
| style="border: 1px solid; width: 510.117px;" | [[SampleRule_class|SampleRule.GroupId]] | | style="border: 1px solid; width: 510.117px;" | [[SampleRule_class|SampleRule.GroupId]] | ||
+ | <source lang="javascript"> | ||
+ | number qnaireId = 11560690; | ||
+ | array a = SampleRule_getByQuestionnaireResourceId(qnaireId); | ||
+ | SampleRule s = a[0]; | ||
+ | print(s.GroupId);//84129 | ||
+ | </source> | ||
| style="border: 1px solid; width: 370.7px;" | [[SampleRule_class|SampleRule.GroupResourceId]] | | style="border: 1px solid; width: 370.7px;" | [[SampleRule_class|SampleRule.GroupResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | number qnaireId = 11560690; | ||
+ | array a = SampleRule_getByQuestionnaireResourceId(qnaireId); | ||
+ | SampleRule s = a[0]; | ||
+ | print(s.GroupResourceId);//17146562 | ||
+ | </source> | ||
| style="border: 1px solid; width: 453.183px;" | | | style="border: 1px solid; width: 453.183px;" | | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" | [[getResourceUniqueIdFromTaskCaseNumber|getResourceUniqueIdFromTaskCaseNumber(caseNumber)]] | ||
+ | | style="border: 1px solid;" | Obsolete | ||
+ | | style="border: 1px solid;" | | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" | [[Task_getTaskByCaseNumber|Task_getTaskByCaseNumber(caseNumber)]] | ||
+ | <source lang="javascript"> | ||
+ | number caseNumber = 62; | ||
+ | Task_getTaskByCaseNumber(caseNumber); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[Task_getTaskByResourceId|Task_getTaskByResourceId(taskId)]] | ||
+ | <source lang="javascript"> | ||
+ | number taskId = 17148474; | ||
+ | Task_getTaskByResourceId(taskId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" | [[createTask|createTask(taskName, parentId, responsibleId, taskDescription, resourceTemplateId)]] | ||
+ | <source lang="javascript"> | ||
+ | string taskName = "test"; | ||
+ | number parentId = 17148446; | ||
+ | string taskDescription = "Test"; | ||
+ | number resourceTemplateId = 13; | ||
+ | number responsibleId = 5895442; | ||
+ | createTask(taskName, parentId, responsibleId, taskDescription, resourceTemplateId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | [[Task_new|Task_new(taskName, parentId, taskDescription, resourceTemplateId)]] | ||
+ | <source lang="javascript"> | ||
+ | string taskName = "test"; | ||
+ | number parentId = 17148446; | ||
+ | string taskDescription = "Test"; | ||
+ | number resourceTemplateId = 2072; | ||
+ | array t = Task_new(taskName, parentId, taskDescription, resourceTemplateId); | ||
+ | t[TASK_RESPONSIBLE_RESOURCE_ID] = 5895442; | ||
+ | Task_save(t); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[setResourceTemplateId|setResourceTemplateId(resourceId, resourceTemplateId)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceId = 17146562; | ||
+ | number resourceTemplateId = 7; | ||
+ | setResourceTemplateId(resourceId, resourceTemplateId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |[[setResourceTemplateResourceId|setResourceTemplateResourceId(resourceId, resourceTemplateId)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceId = 17146562; | ||
+ | number resourceTemplateId = 2066; | ||
+ | setResourceTemplateResourceId(resourceId, resourceTemplateId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[getResourceTemplateId|getResourceTemplateId(resourceId)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceId = 17146562; | ||
+ | getResourceTemplateId(resourceId)//7 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |[[getResourceTemplateResourceId|getResourceTemplateResourceId(resourceId)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceId = 17146562; | ||
+ | getResourceTemplateResourceId(resourceId);//2066 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[getResourceTemplateType|getResourceTemplateType(resourceTemplateId)]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceTemplateId = 7; | ||
+ | getResourceTemplateType(resourceTemplateId); | ||
+ | //2 GroupResourceTemplate | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |[[ResourceTemplateHelper|ResourceTemplateHelper.GetTemplate(resourceTemplateId).ResourceTemplateType]] | ||
+ | <source lang="javascript"> | ||
+ | number resourceTemplateId = 2066; | ||
+ | ResourceTemplateHelper h = new ResourceTemplateHelper (); | ||
+ | h.GetTemplate(resourceTemplateId).ResourceTemplateType; | ||
+ | //2 GroupResourceTemplate | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[User_getRoleIdByName|User_getRoleIdByName(resourceTemplateName)]] | ||
+ | <source lang="javascript"> | ||
+ | string resourceTemplateName = "Consultant"; | ||
+ | User_getRoleIdByName(resourceTemplateName);//1 | ||
+ | </source> | ||
+ | [[getRoleIdByName|getRoleIdByName(resourceTemplateName)]] | ||
+ | <source lang="javascript"> | ||
+ | string resourceTemplateName = "Consultant"; | ||
+ | getRoleIdByName(resourceTemplateName);//1 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |[[User_getRoleResourceIdByName|User_getRoleResourceIdByName(resourceTemplateName)]] | ||
+ | <source lang="javascript"> | ||
+ | string resourceTemplateName = "Consultant"; | ||
+ | User_getRoleResourceIdByName(resourceTemplateName);//1842 | ||
+ | </source> | ||
+ | [[ResourceTemplateHelper_class|ResourceTemplateHelper.GetTemplate(resourceTemplateName, ResourceType).ResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | string resourceTemplateName = "Consultant"; | ||
+ | ResourceTemplateHelper h = new ResourceTemplateHelper (); | ||
+ | h.GetTemplate(resourceTemplateName, Resource_Type_User).ResourceId//1842 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |new function User_getRoleResourceIdByName | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[getResourceTemplateIdByName|getResourceTemplateIdByName(resourceTemplateName)]] | ||
+ | <source lang="javascript"> | ||
+ | string resourceTemplateName = "Standard Group"; | ||
+ | getResourceTemplateIdByName(resourceTemplateName);//7 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |[[ResourceTemplateHelper_class|ResourceTemplateHelper.GetTemplate(resourceTemplateName, ResourceType).ResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | string resourceTemplateName = "Standard Group"; | ||
+ | ResourceTemplateHelper h = new ResourceTemplateHelper (); | ||
+ | h.GetTemplate(resourceTemplateName, Resource_Type_Group).ResourceId//2066 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[ActivityHistory_class|ActivityHistory.OtherUserId]] | ||
+ | <source lang="javascript"> | ||
+ | array userId = {12702700}; | ||
+ | ActivityHistorySearch search = new ActivityHistorySearch(userId); | ||
+ | search.SearchForCati = true; | ||
+ | ActivityHistory history = search.Execute(); | ||
+ | history.SetCurrent(0); | ||
+ | print(history.OtherUserId);//5898785 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |[[ActivityHistory_class|ActivityHistory.OtherUserResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | array userId = {12702700}; | ||
+ | ActivityHistorySearch search = new ActivityHistorySearch(userId); | ||
+ | search.SearchForCati = true; | ||
+ | ActivityHistory history = search.Execute(); | ||
+ | history.SetCurrent(0); | ||
+ | print(history.OtherUserResourceId); | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |new property ActivityHistory.OtherUserResourceId | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[ActivityHistory_class|ActivityHistory.ToUserId]] | ||
+ | <source lang="javascript"> | ||
+ | array userId = {12702700}; | ||
+ | ActivityHistorySearch search = new ActivityHistorySearch(userId); | ||
+ | search.SearchForCati = true; | ||
+ | ActivityHistory history = search.Execute(); | ||
+ | history.SetCurrent(0); | ||
+ | print(history.ToUserId);//5895442 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
+ | | style="border: 1px solid;" |Missing | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[Order_class|Order.UserId]] | ||
+ | <source lang="javascript"> | ||
+ | number orderId = 65; | ||
+ | new Order(orderId).UserId;//5895442 | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |[[Order_class|Order.UserResourceId]] | ||
+ | <source lang="javascript"> | ||
+ | number orderId = 65; | ||
+ | new Order(orderId).UserResourceId; | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |new Property Order.UserResourceId | ||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[PanelStatistics_class|PanelStatistics.TotalEarnedPointsBySurvey()]] | ||
+ | <source lang="javascript"> | ||
+ | array QnaireResourceTemplateId = {15525200}; | ||
+ | array bulkmailResourceTemplateId = {20940}; | ||
+ | number groupId = 15571185; | ||
+ | array From = DateTime_getByYMD (2021,1,1); | ||
+ | array To = DateTime_getByYMD (2021,1,2); | ||
+ | number groupBy = 3; | ||
+ | PanelStatistics p = new PanelStatistics (QnaireResourceTemplateId, bulkmailResourceTemplateId, groupId, From, To, groupBy, 0); | ||
+ | Dictionary d = p.TotalEarnedPointsBySurvey(); | ||
+ | //Return a dictionary where the keys are questionnaire id {"2345": 160, "2355": 60, "2360": 70} | ||
+ | </source> | ||
+ | | style="border: 1px solid;" |Return a dictionary where the keys are questionnaire resource id | ||
+ | | style="border: 1px solid;" |Change return result from id to resource id | ||
+ | |||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |Timereg_getByResourceIds() | ||
+ | Return a dictionary where the keys were user ids | ||
+ | <source lang="javascript"> | ||
+ | |||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
+ | Return a dictionary where the keys are user resource ids | ||
+ | | style="border: 1px solid;" |Change return result from id to resource id | ||
+ | |||
+ | |||
+ | |||
+ | |- valign="top" align="left" | ||
+ | | style="border: 1px solid;" |[[Timereg_getByResource|Timereg_getByResource()]] | ||
+ | Return a dictionary where the keys were user ids | ||
+ | <source lang="javascript"> | ||
+ | |||
+ | </source> | ||
+ | | style="border: 1px solid;" | | ||
+ | Return a dictionary where the keys are user resource ids | ||
+ | | style="border: 1px solid;" | Change return result from id to resource id | ||
+ | |||
+ | |||
+ | |||
|} | |} |
Latest revision as of 10:45, 21 September 2023
Catglobe system has been using two types of Ids at the same time, that causes a lot of confusion.
Therefore, need cleaning up to keep only one type of Id. Some methods will be obsolete and should update to use another one.
Please refer conversion table below for detail:
Obsolete methods | Replace with | Note |
updateUserPermission(resourceId, permissionUsers)
number resourceId = 17148446;
number userId1 = 5895442;
number userId2 = 5898785;
array permissionUsers = {{userId1, "Read"}, {userId2, "FullControl"}};
updateUserPermission(resourceId, permissionUsers);
|
updateUserResourceIdPermission(resourceId, permissionUsers)
number resourceId = 17148446;
number userId1 = 12702700;
number userId2 = 12706043;
Dictionary permissionUsers = {userId1: "Read", userId2: "FullControl"};
updateUserResourceIdPermission(resourceId, permissionUsers);
|
|
QAS.UserId
number userId = 5895442;
number qasId = 193213312;
QAS qas = new QAS (qasId);
qas.UserId = userId;
qas.Save();
print(qas.UserId);
|
QAS.UserResourceId
number userId = 12702700;
number qasId = 193213312;
QAS qas = new QAS (qasId);
qas.UserResourceId = userId;
qas.Save();
print(qas.UserResourceId);
|
|
User_getResourceIdFromUserId(userId) | Obsolete | |
User_getResourceIdFromUserIds(userIds) | Obsolete | |
sendBulkMail(bulkMailId[, maxToSend])
number bulkMailId = 21063;
sendBulkMail(bulkMailId);
number bulkMailId = 21063;
number maxToSend = 100;
sendBulkMail(bulkMailId, maxToSend);
|
BulkMail.Send()
number bulkMailId = 17148200;
BulkMail bm = new BulkMail(bulkMailId);
bm.Send();// return Cattask Instance Id
BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious) number bulkMailId = 17148200;
number maxToSend = 100;
bool isTest = false;
bool isSyncronious = false;
BulkMail bm = new BulkMail(bulkMailId);
bm.SendBulkMail(maxToSend, isTest, isSyncronious)
|
New class BulkMail |
sendBulkMailSyncronious(bulkMailId[, maxToSend])
number bulkMailId = 21063;
sendBulkMailSyncronious(bulkMailId);
number bulkMailId = 21063;
number maxToSend = 100;
sendBulkMailSyncronious(bulkMailId, maxToSend);
|
BulkMail.SendSyncronious()
number bulkMailId = 17148200;
BulkMail bm = new BulkMail(bulkMailId);
bm.SendSyncronious();//return number of sent
BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious) number bulkMailId = 17148200;
number maxToSend = 100;
bool isTest = false;
bool isSyncronious = true;
BulkMail bm = new BulkMail(bulkMailId);
bm.SendBulkMail(maxToSend, isTest, isSyncronious)
|
New class BulkMail |
sendTestBulkMail(bulkMailId[, maxToSend])
number bulkMailId = 21063;
sendTestBulkMail(bulkMailId);
number bulkMailId = 21063;
number maxToSend = 100;
sendTestBulkMail(bulkMailId, maxToSend);
|
BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious)
number bulkMailId = 17148200;
number maxToSend = -1;
bool isTest = true;
bool isSyncronious = false;
BulkMail bm = new BulkMail(bulkMailId);
bm.SendBulkMail(maxToSend, isTest, isSyncronious)
number bulkMailId = 17148200;
number maxToSend = 100;
bool isTest = true;
bool isSyncronious = false;
BulkMail bm = new BulkMail(bulkMailId);
bm.SendBulkMail(maxToSend, isTest, isSyncronious)
|
New class BulkMail |
sendTestBulkMailSyncronious(bulkMailId[, maxToSend])
number bulkMailId = 21063;
sendTestBulkMailSyncronious(bulkMailId);
number bulkMailId = 21063;
number maxToSend = 100;
sendTestBulkMailSyncronious(bulkMailId, maxToSend);
|
BulkMail.SendBulkMail(maxToSend, isTest, isSyncronious)
number bulkMailId = 17148200;
number maxToSend = -1;
bool isTest = true;
bool isSyncronious = true;
BulkMail bm = new BulkMail(bulkMailId);
bm.SendBulkMail(maxToSend, isTest, isSyncronious)
number bulkMailId = 17148200;
number maxToSend = 100;
bool isTest = true;
bool isSyncronious = true;
BulkMail bm = new BulkMail(bulkMailId);
bm.SendBulkMail(maxToSend, isTest, isSyncronious)
|
New class BulkMail |
setBulkMailFromResource(bulkMailId, resourceId)
number bulkMailId = 21065;
number resourceId = 17145420;
setBulkMailFromResource(bulkMailId, resourceId);
|
BulkMail.From = value
number bulkMailId = 17148449;
number resourceId = 17145420;
BulkMail bm = new BulkMail (bulkMailId);
bm.From = new EmailAccount(0, resourceId);
bm.Save();
|
New class BulkMail |
setBulkMailFromGlobalEmailAlias(bulkMailId, globalEmailId)
number bulkMailId = 21065;
number globalEmailId = 16238;
setBulkMailFromGlobalEmailAlias(bulkMailId,globalEmailId);
|
BulkMail.From = value
number bulkMailId = 17148449;
number globalEmailId = 16238;
BulkMail bm = new BulkMail (bulkMailId);
bm.From = new EmailAccount(1, globalEmailId);
bm.Save();
|
New class BulkMail |
setBulkMailFromWebshop(bulkMailId)
number bulkMailId = 21065;
setBulkMailFromWebshop(bulkMailId);
|
BulkMail.From = value
number bulkMailId = 17148449;
BulkMail bm = new BulkMail (bulkMailId);
bm.From = new EmailAccount(2);
bm.Save();
|
New class BulkMail |
setBulkMailFromSupport(bulkMailId)
number bulkMailId = 21065;
setBulkMailFromSupport(bulkMailId);
|
BulkMail.From = value
number bulkMailId = 17148449;
BulkMail bm = new BulkMail (bulkMailId);
bm.From = new EmailAccount(3);
bm.Save();
|
New class BulkMail |
setBulkMailGroups(bulkMailId, groupIds)
number bulkMailId = 21065;
array groupIds = {84129, 84130};
setBulkMailGroups(bulkMailId, groupIds)
|
BulkMail.SetGroups(groupIds)
number bulkMailId = 17148449;
array groupIds = {17146562, 17146563};
BulkMail bm = new BulkMail (bulkMailId);
bm.SetGroups(groupIds)
|
New class BulkMail |
setBulkMailGroupsToBeRebuilt(bulkMailId, groupIds)
number bulkMailId = 21065;
array groupIds = {84129, 84130};
setBulkMailGroupsToBeRebuilt(bulkMailId, groupIds)
|
BulkMail.SetGroupsToBeRebuilt(groupIds)
number bulkMailId = 17148449;
array groupIds = {17146562, 17146563};
BulkMail bm = new BulkMail (bulkMailId);
bm.SetGroupsToBeRebuilt(groupIds)
|
New class BulkMail |
setBulkMailUsers(bulkMailId, userIds)
number bulkMailId = 21065;
array userIds = {5895442, 5898785};
setBulkMailUsers(bulkMailId, userIds);
|
BulkMail.SetUsers(userIds)
number bulkMailId = 17148449;
array userIds = {12702700, 12706043};
BulkMail bm = new BulkMail (bulkMailId);
bm.SetUsers(userIds);
|
New class BulkMail |
addToGroup(groupId)
//run on QAS context
number groupId = 84129;
addToGroup(groupId);
|
Group_addUser(userId, groupId)
//run on QAS context
number groupId = 17146562;
number userId = QAS_getCurrentQAS().UserResourceId;
Group_addUser(userId, groupId);
|
|
removeFromGroup(groupId)
//run on QAS context
number groupId = 84129;
removeFromGroup(groupId)
|
Group_removeUser(userId, groupId)
//run on QAS context
number groupId = 17146562;
number userId = QAS_getCurrentQAS().UserResourceId;
Group_removeUser(userId, groupId)
|
|
questionnaireAnswerSheetExists(qnaireId[, userId])
number qnaireId = 619;
number userId = 5895442;
questionnaireAnswerSheetExists(qnaireId, userId);
//run on QAS context
number qnaireId = 619;
questionnaireAnswerSheetExists(qnaireId);
|
QAS_exists(qnaireId, userId)
number qnaireId = 11560690;
number userId = 12702700;
QAS_exists(qnaireId, userId);
//run on QAS context
number qnaireId = 11560690;
number userId = QAS_getCurrentQAS().UserResourceId;
QAS_exists(qnaireId, userId);
|
|
createUserProjectQuestionnaire(qnaireId[, assignCurrentUser, useExisting])
number qnaireId = 619;
createUserProjectQuestionnaire(qnaireId);
//run on QAS context
number qnaireId = 619;
bool assignCurrentUser = true;
createUserProjectQuestionnaire(qnaireId, assignCurrentUser);
//run on QAS context
number qnaireId = 619;
bool assignCurrentUser = true;
bool useExisting = true;
createUserProjectQuestionnaire(qnaireId, assignCurrentUser, useExisting);
|
new QAS(qnaireId, userId)
number qnaireId = 11560690;
number userId = -1;// force no user
new QAS(qnaireId, userId).Save();
//run on QAS context
number qnaireId = 11560690;
number userId = 0;// use current user
new QAS(qnaireId, userId).Save();
QAS_getByUserResourceId(userId, qnaireId, createIfNone) //run on QAS context
number qnaireId = 11560690;
number userId = 0;// use current user
bool createIfNone = false;
QAS_getByUserResourceId(userId, qnaireId, createIfNone)[0].Id;
|
|
createResourceProjectQuestionnaire(qnaireId[, assignCurrentUser, useExisting])
number qnaireId = 619;
createResourceProjectQuestionnaire(qnaireId);
//run on QAS context
number qnaireId = 619;
bool assignCurrentUser = true;
createResourceProjectQuestionnaire(qnaireId, assignCurrentUser);
//run on QAS context
number qnaireId = 619;
bool assignCurrentUser = true;
bool useExisting = true;
createResourceProjectQuestionnaire(qnaireId, assignCurrentUser, useExisting);
|
new QAS(qnaireId, userId)
number qnaireId = 11560690;
number userId = -1;// force no user
new QAS(qnaireId, userId).Save();
//run on QAS context
number qnaireId = 11560690;
number userId = 0;// use current user
new QAS(qnaireId, userId).Save();
QAS_getByUserResourceId(userId, qnaireId, createIfNone) //run on QAS context
number qnaireId = 11560690;
number userId = 0;// use current user
bool createIfNone = false;
QAS_getByUserResourceId(userId, qnaireId, createIfNone)[0].Id;
|
|
groupExists(groupId)
number groupId = 84129;
groupExists(groupId);
//true/false
string qualifiedName = "My project\\My group";
groupExists(qualifiedName);
//true/false
|
Group_getGroupByResourceId(groupId)
number groupId = 17146562;
Group_getGroupByResourceId(groupId);
//return group object if found or empty if not found
Group_getGroupByName(qualifiedName) string qualifiedName = "My project\\My group";
Group_getGroupByName(qualifiedName);
//return group object if found or empty if not found
|
|
isMemberOfGroup(userId, groupId)
number userId = 5895442;
number groupId = 84129;
isMemberOfGroup(userId, groupId)
isMemberOfGroup(userId, groupName) number userId = 5895442;
string groupName = "My project\\My group";
isMemberOfGroup(userId, groupName);
//run on QAs context
number groupId = 84129;
isMemberOfGroup(groupId)
//run on QAs context
string groupName = "My project\\My group";
isMemberOfGroup(groupName)
|
Group_isMemberOfGroup(userId, groupId)
number userId = 12702700;
number groupId = 17146562;
Group_isMemberOfGroup(userId, groupId);
number userId = 12702700;
string groupName = "My project\\My group";
number groupId = Group_getGroupByName(groupName)[GROUP_RESOURCE_ID];
Group_isMemberOfGroup(userId, groupId);
//run on QAs context
number userId = QAS_getCurrentQAS().UserResourceId;
number groupId = 17146562;
Group_isMemberOfGroup(userId, groupId);
//run on QAs context
number userId = QAS_getCurrentQAS().UserResourceId;
string groupName = "My project\\My group";
number groupId = Group_getGroupByName(groupName)[GROUP_RESOURCE_ID];
Group_isMemberOfGroup(userId, groupId);
|
|
rebuildGroup(groupId)
number groupId = 84129;
rebuildGroup(groupId);
|
Group_rebuildGroup(groupId,parallelBuild)
number groupId = 17146562;
bool parallelBuild = true;
Group_rebuildGroup(groupId, parallelBuild);
|
|
Tabulation_saveAsReport(name, parentId, permissionGroups[, overwrite])
DCS_use(16749647);
string name = "Report Test";
number parentId = 17148135;
number groupId1 = 84129;
number groupId2 = 84130;
array permissionGroups = {{groupId1, "Write"}, {groupId2, "FullControl"}};
bool overwrite = true;
createCrossDiagram ({"Q1"},{"Q2"});
Tabulation_saveAsReport(name, parentId, permissionGroups, overwrite);
|
Tabulation.SaveAsReport(name, parentId, permissionGroups, overwrite)
string name = "Report Test";
number parentId = 17148135;
number groupId1 = 17146562;
number groupId2 = 17146563;
Dictionary permissionGroups = {groupId1: "Write", groupId2: "FullControl"};
bool overwrite = true;
TabulationDiagramParameter p = new TabulationDiagramParameter ();
Tabulation t = new Tabulation();
p.DataCache = 16749647;
t.CreateCrossDiagram ({"Q1"},{"Q2"}, p);
t.SaveAsReport(name, parentId, permissionGroups, overwrite);
|
New class Tabulation |
updateGroupPermission(resourceId, permissionGroups)
number resourceId = 17148446;
number groupId1 = 84129;
number groupId2 = 84130;
array permissionGroups = {{groupId1, "Write"}, {groupId2, "FullControl"}};
updateGroupPermission(resourceId, permissionGroups);
|
updateGroupResourceIdPermission(resourceId, permissionGroups)
number resourceId = 17148446;
number groupId1 = 17146562;
number groupId2 = 17146563;
Dictionary permissionGroups = {groupId1: "Write", groupId2: "FullControl"};
updateGroupResourceIdPermission(resourceId, permissionGroups);
|
|
sendMailTemplateFromResource(parentId, toEmail, alias, mailTemplateId[, fromEmail, callbackMethod])
number mailTemplateId = 6465;
string toEmail = "email@...";
string alias = "Alias";
number parentId = 17148159;
sendMailTemplateFromResource(parentId, toEmail, alias, mailTemplateId)
number mailTemplateId = 6465;
string toEmail = "email@...";
string alias = "Alias";
number parentId = 17148159;
EmailAccount fromEmail = new EmailAccount("panel");
sendMailTemplateFromResource(parentId, toEmail, alias, mailTemplateId, fromEmail)
number mailTemplateId = 6465;
string toEmail = "email@...";
string alias = "Alias";
number parentId = 17148159;
EmailAccount fromEmail = new EmailAccount("panel");
object callbackMethod = function (string subject, string message){
subject = "Test" + getRandomNumber(0,10);
return {subject, message};
};
sendMailTemplateFromResource(parentId, toEmail, alias, mailTemplateId, fromEmail, callbackMethod)
|
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod)
number mailTemplateId = 17148149;
bool isTest = false;
string toEmail = "email@...";
string alias = "Alias";
number parentId = 17148159;
string fromEmail = empty;
object callbackMethod = empty;
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod)
number mailTemplateId = 17148149;
bool isTest = false;
string toEmail = "email@...";
string alias = "Alias";
number parentId = 17148159;
string fromEmail = "panel@...";
object callbackMethod = empty;
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod)
number mailTemplateId = 17148149;
bool isTest = false;
string toEmail = "email@...";
string alias = "Alias";
number parentId = 17148159;
string fromEmail = "panel@...";
object callbackMethod = function (string subject, string message){
subject = "Test" + getRandomNumber(0,10);
return {subject, message};
};
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod)
|
New method EmailTemplate_send |
sendMailTemplate(toEmail, alias, mailTemplateId)
//run on QAS context
number mailTemplateId = 6465;
string toEmail = "email@...";
string alias = "Alias";
sendMailTemplate(toEmail, alias, mailTemplateId)
//run on QAS context
number mailTemplateId = 6465;
string toEmail = "email@...";
string alias = "Alias";
EmailAccount fromEmail = new EmailAccount("panel");
object callbackMethod = function (string subject, string message){
subject = "Test" + getRandomNumber(0,10);
return {subject, message};
};
sendMailTemplate(toEmail, alias, mailTemplateId, fromEmail, callbackMethod)
|
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias)
//run on QAS context
number mailTemplateId = 17148149;
bool isTest = false;
string toEmail = "email@...";
string alias = "Alias";
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias)
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod) //run on QAS context
number mailTemplateId = 17148149;
bool isTest = false;
string toEmail = "email@...";
string alias = "Alias";
number parentId = empty;
string fromEmail = "panel@...";
object callbackMethod = function (string subject, string message){
subject = "Test" + getRandomNumber(0,10);
return {subject, message};
};
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod)
|
New method EmailTemplate_send |
sendTestMailTemplate(toEmail, alias, mailTemplateId[, fromEmail, callbackMethod])
//run on QAS context
number mailTemplateId = 6465;
string toEmail = "email@...";
string alias = "Alias";
EmailAccount fromEmail = new EmailAccount("panel");
object callbackMethod = function (string subject, string message){
subject = "Test" + getRandomNumber(0,10);
return {subject, message};
};
sendTestMailTemplate(toEmail, alias, mailTemplateId, fromEmail, callbackMethod)
|
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias[, parentId, fromEmail, callbackMethod])
//run on QAS context
number mailTemplateId = 17148149;
bool isTest = true;
string toEmail = "email@...";
string alias = "Alias";
number parentId = empty;
string fromEmail = "panel@...";
object callbackMethod = function (string subject, string message){
subject = "Test" + getRandomNumber(0,10);
return {subject, message};
};
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod)
|
New method EmailTemplate_send |
getProjectQuestionnaireName([qnaireId])
number qnaireId = 619;
getProjectQuestionnaireName(qnaireId);
//run on QAS context
getProjectQuestionnaireName();
|
getProjectQuestionnaireNameByResourceId(qnaireId)
number qnaireId = 11560690;
getProjectQuestionnaireNameByResourceId(qnaireId);
Resource_getResourceName(qniareId) number qnaireId = 11560690;
Resource_getResourceName(qnaireId);
Questionnaire_current().QualifiedName //run on QAS context
Questionnaire_current().QualifiedName;
|
New method Questionnaire_current |
setReportStyleSheetId(reportStyleSheetId)
DCS_use(16749647);
number reportStyleSheetId = 11060624;
setReportStyleSheetId(getResourceIdFromGuid (getResourceGuid(reportStyleSheetId)));
createCrossDiagram({"Q1"}, {"Q2"});
|
Tabulation.StyleSheet = value
number reportStyleSheetId = 11060624;
TabulationDiagramParameter p = new TabulationDiagramParameter();
p.DataCacheId = 16749647;
Tabulation t = new Tabulation();
t.StyleSheet = new ReportStyleSheet(reportStyleSheetId);
t.CreateCrossDiagram({"Q1"}, {"Q2"}, p);
|
New Tabulation class New ReportStyleSheet class |
setUserProjectQuestionnaireUserId(userId)
//Run on QAS context
number userId = 5895442;
setUserProjectQuestionnaireUserId(userId);
|
QAS.UserResourceId = value
// run on QAS context
number userId = 12702700;
QAS qas = QAS_getCurrentQAS();
qas.UserResourceId = userId;
qas.Save();
|
|
getUserProjectQuestionnaireUserId()
//Run on QAS context
getUserProjectQuestionnaireUserId();//5895442
|
QAS.UserResourceId
// run on QAS context
QAS_getCurrentQAS().UserResourceId;//12702700
// run on QAS context
User_getQasUser().ResourceId;//12702700
|
|
setRPQUserId(userId)
//Run on QAS context
number userId = 5895442;
setRPQUserId(userId);
|
QAS.UserResourceId = value
// run on QAS context
number userId = 12702700;
QAS qas = QAS_getCurrentQAS();
qas.UserResourceId = userId;
qas.Save();
|
|
addJournal(resourceId, userId, journalType, content)
number userId = 5895442;
number resourceId = 17148446;
string journalType = "Comment";
string content = "xxx";
addJournal(resourceId, userId, journalType, content);
|
new ResourceJournalEntry (resourceId, journalType, content).Save()
number resourceId = 17148446;
string journalType = "Comment";
string content = "xxx";
new ResourceJournalEntry (resourceId, journalType, content).Save();
|
|
getTimezone([userId])
number userId = 5895442;
getTimezone(userId);
// run on QAS context
getTimezone();
|
User.TimezoneId
number userId = 12702700;
User_getUserByResourceId(userId).TimezoneId;
// run on QAS context
User_getQasUser().TimezoneId;
|
|
setTimezone([userId,] timezoneId)
number userId = 5895442;
number timezoneId = 40;
setTimezone(userId, timezoneId);
// run on QAS context
number timezoneId = 40;
setTimezone(timezoneId);
|
User.TimezoneId = value
number userId = 12702700;
number timezoneId = 40;
User user = User_getUserByResourceId(userId);
user.TimezoneId = timezoneId;
user.Save();
// run on QAS context
number timezoneId = 40;
User user = User_getQasUser();
user.TimezoneId = timezoneId;
user.Save();
|
|
setUserRoleId(userId, resourceTemplateId)
number userId = 5895442;
number resourceTemplateId = 6;
setUserRoleId(userId, resourceTemplateId);
|
setResourceTemplateResourceId(userId, resourceTemplateId)
number userId = 12702700;
number resourceTemplateId = 1847;
setResourceTemplateResourceId(userId, resourceTemplateId);
User.ResourceTemplateResourceId = value number userId = 12702700;
number resourceTemplateId = 1847;
User_getUserByResourceId(userId).ResourceTemplateResourceId = resourceTemplateId;
|
|
getUserRoleId(userId)
number userId = 5895442;
getUserRoleId(userId);//6
|
getResourceTemplateResourceId(userId)
number userId = 12702700;
getResourceTemplateResourceId(userId);//1847
User.ResourceTemplateResourceId number userId = 12702700;
User_getUserByResourceId(userId).ResourceTemplateResourceId;//1847
|
|
isMemberOfSampleRule([userId,] sampleRuleId)
number sampleRuleId = 125991;
number userId = 5895442;
isMemberOfSampleRule(userId, sampleRuleId);
//run on QAS context
number sampleRuleId = 125991;
isMemberOfSampleRule(sampleRuleId);
|
User_isMemberOfSampleRule(userId, sampleRuleId)
number sampleRuleId = 125991;
number userId = 12702700;
User_isMemberOfSampleRule(userId, sampleRuleId);
//run on QAS context
number sampleRuleId = 125991 ;
number userId = QAS_getCurrentQAS().UserResourceId;
User_isMemberOfSampleRule(userId, sampleRuleId);
|
New method User_isMemberOfSampleRule |
EmailTemplate.PrimaryKey
string name = "test";
number parentId = 17148446;
EmailTemplate e = new EmailTemplate (name, parentId);
e.Save();
print(e.PrimaryKey);//6468
|
EmailTemplate.ResourceId
string name = "test";
number parentId = 17148446;
EmailTemplate e = new EmailTemplate (name, parentId);
e.Save();
print(e.ResourceId);//17148467
|
|
UserQuarantine.QuarantineResourceId
number userId= 12706043;
array quarantineHistory = Quarantine_getUserHistory(userId);
UserQuarantine q = quarantineHistory[0];
q.QuarantineResourceId;//1
|
UserQuarantine.QuarantineResourceId
number userId= 12706043;
array quarantineHistory = Quarantine_getUserHistory(userId);
UserQuarantine q = quarantineHistory[0];
q.QuarantineResourceId;//15550519
|
|
User.PrimaryKey
User user = User_getLoggedInUser();
user.PrimaryKey;//5895442
|
User.ResourceId
User user = User_getLoggedInUser();
user.ResourceId;//12702700
|
|
getQuestionnaireTemplateId(qualifiedName)
string qualifiedName = "Common resources\\Panel Questionnaire Template";
getQuestionnaireTemplateId(qualifiedName);//536
|
new QuestionnaireTemplate(qualifiedName).Id
string qualifiedName = "Common resources\\Panel Questionnaire Template";
new QuestionnaireTemplate(qualifiedName).Id;//11560689
|
New class QuestionnaireTemplate |
getProjectQuestionnaireId(qualifiedName)
string qualifiedName = "Common resources\\Ad Hoc 178";
getProjectQuestionnaireId(qualifiedName);//619
|
new Questionnaire(qualifiedName).Id
string qualifiedName = "Common resources\\Ad Hoc 178";
new Questionnaire(qualifiedName).Id;//11560690
|
New class Questionnaire |
getReturnToProjectQuestionnaireId()
// run on QAS context
getReturnToProjectQuestionnaireId();//619
|
GetReturnToQuestionnaireId()
// run on QAS context
GetReturnToQuestionnaireId();//11560690
|
New method GetReturnToQuestionnaireId |
getReportStyleSheetIdByName(qualifiedName)
string qualifiedName = "Common resources\\Tabulation Standard Report Stylesheet";
getReportStyleSheetIdByName(qualifiedName);//45
|
new ReportStyleSheet(qualifiedName).Id
string qualifiedName = "Common resources\\Tabulation Standard Report Stylesheet";
new ReportStyleSheet(qualifiedName).Id;//11060624
|
New class ReportStyleSheet |
getReportStyleSheetId()
DCS_use(16749647);
number reportStyleSheetId = 11060624;
setReportStyleSheetId(getResourceIdFromGuid (getResourceGuid(reportStyleSheetId)));
createCrossDiagram({"Q1"}, {"Q2"});
getReportStyleSheetId();//45
|
Tabulation.StyleSheet
number reportStyleSheetId = 11060624;
TabulationDiagramParameter p = new TabulationDiagramParameter();
p.DataCacheId = 16749647;
Tabulation t = new Tabulation();
t.StyleSheet = new ReportStyleSheet(reportStyleSheetId);
t.CreateCrossDiagram({"Q1"}, {"Q2"}, p);
t.StyleSheet;//11060624
|
New class Tabulation New class ReportStyleSheet |
getResourceIdFromGuid(guid)
string guid = "xxx";
getResourceIdFromGuid(guid);//619
|
getResourceUniqueIdFromGuid(guid)
string guid = "xxx";
getResourceUniqueIdFromGuid(guid);//11560690
|
|
getResourceGuid(Resource_Type_, resourceId)
number resourceId = 619;
getResourceGuid(Resource_Type_Questionnaire, resourceId);
|
getResourceGuid(resourceId)
number resourceId = 11560690;
getResourceGuid(resourceId);
|
This function is obsolete with 2 parameters, only implemented for questionnaire and PQ, others resource type will throw error |
task[TASK_CASE_NUMBER]
string taskName = "test";
number parentId = 17148446;
string taskDescription = "Test";
number resourceTemplateId = 2072;
array t = Task_new(taskName, parentId, taskDescription, resourceTemplateId);
Task_save(t);
print(t[TASK_CASE_NUMBER]);//62
|
task[TASK_RESOURCE_ID]
string taskName = "test";
number parentId = 17148446;
string taskDescription = "Test";
number resourceTemplateId = 2072;
array t = Task_new(taskName, parentId, taskDescription, resourceTemplateId);
Task_save(t);
print(t[TASK_RESOURCE_ID]);//17148474
|
|
getCurrentUserId()
getCurrentUserId();//5895442
|
User_getCurrentUser()
User_getCurrentUser().ResourceId;//12702700
|
|
getUserIdFromResourceId(guid)
string guid = "xxx";
getUserIdFromResourceId(guid);//5895442
|
getResourceUniqueIdFromGuid(guid)
string guid = "xxx";
getResourceUniqueIdFromGuid(guid);//12702700
|
|
createUser(userResourceTemplateId)
number resourceTemplateId = 1;
createUser(resourceTemplateId);//5895442
|
User_new(userResourceTemplateId)
number resourceTemplateId = 1842;
User user = User_new(resourceTemplateId);
user.ParentResourceId = 17148446;
user.Save();
|
|
getRPQUserId()
//run on QAS context
getRPQUserId();//5895442
|
QAS.UserResourceId
//run on QAS context
QAS_getCurrentQAS().UserResourceId;//12702700
//run on QAS context
User_getQasUser().ResourceId;//12702700
|
|
User.ResourceTemplateId
User user = User_getLoggedInUser();
user.ResourceTemplateId;//1
|
User.ResourceTemplateResourceId
User user = User_getLoggedInUser();
user.ResourceTemplateResourceId;//1842
|
|
UserQuarantine.AddedByUserId
number userId= 12706043;
array quarantineHistory = Quarantine_getUserHistory(userId);
UserQuarantine q = quarantineHistory[0];
q.AddedByUserId;//5895442
|
UserQuarantine.AddedByUserResourceId
number userId= 12706043;
array quarantineHistory = Quarantine_getUserHistory(userId);
UserQuarantine q = quarantineHistory[0];
q.AddedByUserResourceId;//12702700
|
New property UserQuarantine.AddedByUserResourceId |
UserQuarantine.RemovedByUserId
number userId= 12706043;
array quarantineHistory = Quarantine_getUserHistory(userId);
UserQuarantine q = quarantineHistory[0];
q.RemovedByUserId;//5895442
|
UserQuarantine.RemovedByUserResourceId
number userId= 12706043;
array quarantineHistory = Quarantine_getUserHistory(userId);
UserQuarantine q = quarantineHistory[0];
q.RemovedByUserResourceId;//12702700
|
New property UserQuarantine.RemovedByUserResourceId |
Quarantine_getUserIdsOfQuarantined(quarantineIdList)
array quarantineIdList = {15550518,15550519};
Quarantine_getUserIdsOfQuarantined(quarantineIdList);
//{5895442,5898785,...}
|
Quarantine_GetUserResourceIdsOfQuarantined(quarantineIdList)
array quarantineIdList = {15550518,15550519};
Quarantine_GetUserResourceIdsOfQuarantined(quarantineIdList);
//{12702700,12706043,..}
|
New method Quarantine_GetUserResourceIdsOfQuarantined |
User.CreatedByUserId
User user = User_getLoggedInUser();
user.CreatedByUserId;//5895442
|
User.CreatedByUserResourceId
User user = User_getLoggedInUser();
user.CreatedByUserResourceId;//12702700
|
New property User.CreatedByUserResourceId |
User.ModifiedByUserId
User user = User_getLoggedInUser();
user.ModifiedByUserId;//5895442
|
User.ModifiedByUserResourceId
User user = User_getLoggedInUser();
user.ModifiedByUserResourceId;//12702700
|
New property User.ModifiedByUserResourceId |
SampleRule.QuestionnaireId
number groupId = 17146562;
array a = SampleRule_getByGroupResourceId(groupId);
SampleRule s = a[0];
print(s.QuestionnaireId );//619
|
SampleRule.QuestionnaireResourceId
number groupId = 17146562;
array a = SampleRule_getByGroupResourceId(groupId);
SampleRule s = a[0];
print(s.QuestionnaireResourceId );//11560690
|
|
SampleRule.GroupId
number qnaireId = 11560690;
array a = SampleRule_getByQuestionnaireResourceId(qnaireId);
SampleRule s = a[0];
print(s.GroupId);//84129
|
SampleRule.GroupResourceId
number qnaireId = 11560690;
array a = SampleRule_getByQuestionnaireResourceId(qnaireId);
SampleRule s = a[0];
print(s.GroupResourceId);//17146562
|
|
getResourceUniqueIdFromTaskCaseNumber(caseNumber) | Obsolete | |
Task_getTaskByCaseNumber(caseNumber)
number caseNumber = 62;
Task_getTaskByCaseNumber(caseNumber);
|
Task_getTaskByResourceId(taskId)
number taskId = 17148474;
Task_getTaskByResourceId(taskId);
|
|
createTask(taskName, parentId, responsibleId, taskDescription, resourceTemplateId)
string taskName = "test";
number parentId = 17148446;
string taskDescription = "Test";
number resourceTemplateId = 13;
number responsibleId = 5895442;
createTask(taskName, parentId, responsibleId, taskDescription, resourceTemplateId);
|
Task_new(taskName, parentId, taskDescription, resourceTemplateId)
string taskName = "test";
number parentId = 17148446;
string taskDescription = "Test";
number resourceTemplateId = 2072;
array t = Task_new(taskName, parentId, taskDescription, resourceTemplateId);
t[TASK_RESPONSIBLE_RESOURCE_ID] = 5895442;
Task_save(t);
|
|
setResourceTemplateId(resourceId, resourceTemplateId)
number resourceId = 17146562;
number resourceTemplateId = 7;
setResourceTemplateId(resourceId, resourceTemplateId);
|
setResourceTemplateResourceId(resourceId, resourceTemplateId)
number resourceId = 17146562;
number resourceTemplateId = 2066;
setResourceTemplateResourceId(resourceId, resourceTemplateId);
|
|
getResourceTemplateId(resourceId)
number resourceId = 17146562;
getResourceTemplateId(resourceId)//7
|
getResourceTemplateResourceId(resourceId)
number resourceId = 17146562;
getResourceTemplateResourceId(resourceId);//2066
|
|
getResourceTemplateType(resourceTemplateId)
number resourceTemplateId = 7;
getResourceTemplateType(resourceTemplateId);
//2 GroupResourceTemplate
|
ResourceTemplateHelper.GetTemplate(resourceTemplateId).ResourceTemplateType
number resourceTemplateId = 2066;
ResourceTemplateHelper h = new ResourceTemplateHelper ();
h.GetTemplate(resourceTemplateId).ResourceTemplateType;
//2 GroupResourceTemplate
|
|
User_getRoleIdByName(resourceTemplateName)
string resourceTemplateName = "Consultant";
User_getRoleIdByName(resourceTemplateName);//1
getRoleIdByName(resourceTemplateName) string resourceTemplateName = "Consultant";
getRoleIdByName(resourceTemplateName);//1
|
User_getRoleResourceIdByName(resourceTemplateName)
string resourceTemplateName = "Consultant";
User_getRoleResourceIdByName(resourceTemplateName);//1842
ResourceTemplateHelper.GetTemplate(resourceTemplateName, ResourceType).ResourceId string resourceTemplateName = "Consultant";
ResourceTemplateHelper h = new ResourceTemplateHelper ();
h.GetTemplate(resourceTemplateName, Resource_Type_User).ResourceId//1842
|
new function User_getRoleResourceIdByName |
getResourceTemplateIdByName(resourceTemplateName)
string resourceTemplateName = "Standard Group";
getResourceTemplateIdByName(resourceTemplateName);//7
|
ResourceTemplateHelper.GetTemplate(resourceTemplateName, ResourceType).ResourceId
string resourceTemplateName = "Standard Group";
ResourceTemplateHelper h = new ResourceTemplateHelper ();
h.GetTemplate(resourceTemplateName, Resource_Type_Group).ResourceId//2066
|
|
ActivityHistory.OtherUserId
array userId = {12702700};
ActivityHistorySearch search = new ActivityHistorySearch(userId);
search.SearchForCati = true;
ActivityHistory history = search.Execute();
history.SetCurrent(0);
print(history.OtherUserId);//5898785
|
ActivityHistory.OtherUserResourceId
array userId = {12702700};
ActivityHistorySearch search = new ActivityHistorySearch(userId);
search.SearchForCati = true;
ActivityHistory history = search.Execute();
history.SetCurrent(0);
print(history.OtherUserResourceId);
|
new property ActivityHistory.OtherUserResourceId |
ActivityHistory.ToUserId
array userId = {12702700};
ActivityHistorySearch search = new ActivityHistorySearch(userId);
search.SearchForCati = true;
ActivityHistory history = search.Execute();
history.SetCurrent(0);
print(history.ToUserId);//5895442
|
Missing | |
Order.UserId
number orderId = 65;
new Order(orderId).UserId;//5895442
|
Order.UserResourceId
number orderId = 65;
new Order(orderId).UserResourceId;
|
new Property Order.UserResourceId |
PanelStatistics.TotalEarnedPointsBySurvey()
array QnaireResourceTemplateId = {15525200};
array bulkmailResourceTemplateId = {20940};
number groupId = 15571185;
array From = DateTime_getByYMD (2021,1,1);
array To = DateTime_getByYMD (2021,1,2);
number groupBy = 3;
PanelStatistics p = new PanelStatistics (QnaireResourceTemplateId, bulkmailResourceTemplateId, groupId, From, To, groupBy, 0);
Dictionary d = p.TotalEarnedPointsBySurvey();
//Return a dictionary where the keys are questionnaire id {"2345": 160, "2355": 60, "2360": 70}
|
Return a dictionary where the keys are questionnaire resource id | Change return result from id to resource id
|
Timereg_getByResourceIds()
Return a dictionary where the keys were user ids |
Return a dictionary where the keys are user resource ids |
Change return result from id to resource id
|
Timereg_getByResource()
Return a dictionary where the keys were user ids |
Return a dictionary where the keys are user resource ids |
Change return result from id to resource id
|