0 Replies Latest reply: Nov 5, 2012 9:51 AM by user243865 RSS

    How do I get the value of a resource property stored in the user object?

    user243865
      I need a way to get to the myflag property on the resources in an object

      I have been trying to get to it by first getting the user object...
      but how can I get to the properties them self?

      If the following is the user object and I need to refer to the different myflag properties in a form?

      What I want to do is to make the system NOT change password on accounts where the myflag is set to true

      Anyone that could point me right here?



      I use the following code to get the userObj in the form...
            <Field name='userObj'>
              <Derivation>
                <invoke name='getObject'>
                  <ref>:display.session</ref>
                  <s>User</s>
                  <ref>resourceAccounts.id</ref>
                </invoke>
              </Derivation>
              <Disable>
                <isnull>
                  <ref>resourceAccounts.id</ref>
                </isnull>
              </Disable>
            </Field>
      And the resulting userObj looks like this
      <!--  MemberObjectGroups="#ID#Top" hasCapabilities="true" id="#ID#BAF7-:882E9B73531:87D587F7-:726EA99B2E0A89CD" name="43725"-->
      <User id='#ID#BAF7-:882E9B73531:87D587F7-:726EA99B2E0A89CD' name='43725' creator='Nnnnn' createDate='1328101309098' lastModifier='Nnnnn' lastModDate='1352128262380' lastMod='71' repoMod='1352128262383' primaryObjectClass='User' password='xxx' lastPasswordUpdate='1352128195038'>
        <Services>
          <ObjectRef type='Resource' id='#ID#DC98A0E2B99AE627:1A6684F:10F96310B9F:-7FE1' name='Xolid'/>
        </Services>
        <PasswordExpiration>2012-11-04T15:09:55.038Z</PasswordExpiration>
        <ResourceInfoList>
          <ResourceInfo accountId='cn=S43725,ou=Xolid Users,ou=User Accounts,dc=adxx,dc=xxx,dc=net' accountGUID='&lt;GUID=3c020b6e1c253d45808fc47889201c4a&gt;' tempId='dc98a0e2b99ae627:-3984a159:139b34ea14f:-4c10' created='true' lastPasswordUpdate='1352128262115'>
            <ObjectRef type='Resource' id='#ID#DC98A0E2B99AE627:1A6684F:10F96310B9F:-7FE1' name='Xolid'/>
            <ResourcePropertyValues>
              <Map>
                <MapEntry key='myflag' value='false'/>
              </Map>
            </ResourcePropertyValues>
          </ResourceInfo>
          <ResourceInfo accountId='cn=S43725A,ou=Administrative Users,ou=User Accounts,dc=adxx,dc=xxx,dc=net' accountGUID='&lt;GUID=fc4ca613bf40b644948cf216e1ec50bd&gt;' tempId='dc98a0e2b99ae627:-4ce08fd6:13a5c68dd38:4fc4' created='true' lastPasswordUpdate='1352128262285'>
            <ObjectRef type='Resource' id='#ID#DC98A0E2B99AE627:1A6684F:10F96310B9F:-7FE1' name='Xolid'/>
            <ResourcePropertyValues>
              <Map>
                <MapEntry key='myflag' value='true'/>
              </Map>
            </ResourcePropertyValues>
          </ResourceInfo>
        </ResourceInfoList>
        <Attribute name='closest_manager' type='string' value='77774'/>
        <Attribute name='firstname' type='string' value='Test'/>
        <Attribute name='fullname' type='string' value='Testersson, Test'/>
        <Attribute name='xr_attr_flag' type='string' value='N -------- MA20120201 MB20120201 MC20120201 MD20120201 ME20120201 MF20120201 MG20120201 MH20120201 MI20120201 MJ20120201 MK20120201'/>
        <Attribute name='xr_date_flag' type='string' value='N 20120914 MS20120201 MT20120914'/>
        <Attribute name='lastname' type='string' value='Testersson'/>
        <Attribute name='local_id' type='string' value='S43725'/>
        <Attribute name='position_end_date' type='string' value='2012-08-10 01:08:18.0'/>
        <AdminRoles>
          <ObjectRef type='AdminRole' id='#ID#DC98A0E2B99AE627:1A6684F:10F96310B9F:-7FF7' name='XXX - Manager'/>
        </AdminRoles>
        <MemberObjectGroups>
          <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
        </MemberObjectGroups>
        <Properties>
          <Property name='AD_HomeDir_Xolid_S43725' value='\\XXX5014A\UserFolders$\S43725'/>
          <Property name='AD_ProfileDir_Xolid_S43725' value='\\XXX5014A\UserProfiles$\S43725'/>
          <Property name='idm_lastLoginLocale' value='sv'/>
          <Property name='myflag' value='false'/>
        </Properties>
      </User>