Create Configuration key in new web portal for object selection

I the ne web portal, in 9.2.2 I would like to limit which identities that may be selected when sending an inquiry regarding a pending request. Today, both main identitites and sub identities are shown, and I would like to add a filter, to show only sub identities. I therefore created a configuration key in the admin portal, named Filters for object selection / PWOHelperPWO.UID_PersonHead, with the value identitytype = 'Organizational'.
This does not seem to have an effect. What am I missing?

Regards

Rune Hystad

Parents
  • Hi, 

    I've been checking the code for v93 and the query to find the recipient of the enquiry is on the Person table so I would not recommend creating a configuration key for Person.UID_Person , it could interfere with so so many things.

    In the code, I've made a modification to qer/workflow-action.service.ts:

    private createCdrQuestioneer(uidPerson: string): BaseCdr {
        const fkRelation = {
          ChildColumnName: 'UID_PersonRelated',
          ParentTableName: 'Person',
          ParentColumnName: 'UID_Person',
          IsMemberRelation: false,
        };
    
        const column = this.entityService.createLocalEntityColumn(
          {
            ColumnName: fkRelation.ChildColumnName,
            Type: ValType.String,
            FkRelation: fkRelation,
            MinLen: 1,
          },
          [
            this.person.createFkProviderItem(fkRelation, [
              { ColumnName: 'UID_Person', CompareOp: CompareOperator.NotEqual, Type: FilterType.Compare, Value1: uidPerson },
      

    and added a line to the filter:

    this.person.createFkProviderItem(fkRelation, [
              { ColumnName: 'UID_Person', CompareOp: CompareOperator.NotEqual, Type: FilterType.Compare, Value1: uidPerson }, //when selecting the recipient of the enquiry avoid the current user.
              { ColumnName: 'IdentityType', CompareOp: CompareOperator.Equal, Type: FilterType.Compare, Value1: 'yourvalue' }, // and that user should be of the IdentityType "yourvalue"
            ]),
          ],
    and this seems to work. Alas, it is hardcoded , so modifications will need reading an external custom setting or the like.
    HtH!! 
Reply
  • Hi, 

    I've been checking the code for v93 and the query to find the recipient of the enquiry is on the Person table so I would not recommend creating a configuration key for Person.UID_Person , it could interfere with so so many things.

    In the code, I've made a modification to qer/workflow-action.service.ts:

    private createCdrQuestioneer(uidPerson: string): BaseCdr {
        const fkRelation = {
          ChildColumnName: 'UID_PersonRelated',
          ParentTableName: 'Person',
          ParentColumnName: 'UID_Person',
          IsMemberRelation: false,
        };
    
        const column = this.entityService.createLocalEntityColumn(
          {
            ColumnName: fkRelation.ChildColumnName,
            Type: ValType.String,
            FkRelation: fkRelation,
            MinLen: 1,
          },
          [
            this.person.createFkProviderItem(fkRelation, [
              { ColumnName: 'UID_Person', CompareOp: CompareOperator.NotEqual, Type: FilterType.Compare, Value1: uidPerson },
      

    and added a line to the filter:

    this.person.createFkProviderItem(fkRelation, [
              { ColumnName: 'UID_Person', CompareOp: CompareOperator.NotEqual, Type: FilterType.Compare, Value1: uidPerson }, //when selecting the recipient of the enquiry avoid the current user.
              { ColumnName: 'IdentityType', CompareOp: CompareOperator.Equal, Type: FilterType.Compare, Value1: 'yourvalue' }, // and that user should be of the IdentityType "yourvalue"
            ]),
          ],
    and this seems to work. Alas, it is hardcoded , so modifications will need reading an external custom setting or the like.
    HtH!! 
Children