Odd template behavior in 9.3

I have a template for UNSAccountB and when I create an account manually the template works fine, but when I do it using a business role it doesn't work.

This is the relevant portion of the template (they are identical between FullManaged and Unmanaged):

Else
	Dim CentralAccount As String = $FK(UID_Person).CentralAccount$

	If $FK(UID_Person).CCC_ImportSource$ = "ACME" Then
		CentralAccount = CentralAccount.Substring(0, CentralAccount.Length - 4)
	End If

	Value = CentralAccount
End If

Parents
  • I take it the BR assigns the account definition, right?

    I've made some tests and it works fine in my case.

    • Modified the template for the CN attr on a custom UnsAccountB
    • Created the UNSAccountB and linked a user. The template works.
    • or, located the user in Manager, assigned the corresponding account definition and the template applied, too

  • Yes, the BR assigns the account def.

    Can you test with moving the template from cn to AccountName and set cn as "Value = $AccountName$"?

  • Confirmed the behaviour as you said.

    Template for CN:

    ...

    If (Sistema="ADM") And $FK(UID_Person).CentralAccount$="odc55" Then
    Value =$AccountName$
    end if

    ...

    Template from AccountName:

    ...

    If $FK(UID_Person).CentralAccount$="odc55" Then
    Value = "odc_test"
    End If

    ...

    Then:

    • I create a new UNSAccountB of system type ADM for identity odc55 and the template works. The resultant cn is "odc_test"
    • I assign an account definition of system type ADM to identity odc55 and it does not work. I reapply templates and works alright. The cn is changed to odc_test

    Strange thing. During my first tests the template assigned the resultant cn a value of "odc_pruebas" and created an account with that cn. Deleted it, double checked the UNSAccountB table to verifiy and yes, it was not there.  Now If I assign an account definition, the name is always "odc_pruebas" although that name is no longer in my templates nor the account exists or  is it pending deletion by a deferred operation. Could be an "account recall from bin" process that I'm not aware of.

    All in all. Doublechecked. Happens as you said.

  • Np, thank you for pointing this out.

    I mean.. it's just crazy. I hadn't had the time to test this, I'm busy migrating my Angular code to v93. But I've kept testing this. I've restarted the database, recompiled it will all the options. None of my templates for UnsAccountB use the tag I used for testing first hour this morning when I read your post. And still , when I assign an account definition to the user, the CN is modified to add that old testing tag, even though I've changed or deleted it several times. 

    Plus. I've copied the TSB_PersonHasTSBAccountDef_Autocraete_UNSAccountB process, deactivated the original and renamed it.  Modified to avoid account recalling. But still.. the original process is being launched, I can see it in JobQueueInfo with all its steps.. 

Reply Children