This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Change UID_Person to UNSAccountB

Hi All,

I have two UNSAccountB :

  1. UNSAccountB_A  with the UID of RealPerson
  2. UNSAccountB_B With the UID of dummy person  ( connected to the previuos real Person)

I need disable the UNSAccountB_A  from RealPerson and assign the UNSAccountB_B to the real Person.

To switch the UNSAccounB I need to update the UID_Person on UNSAccountB, but I receive a Write Permission Error.

I must change the UID_Person for a specific need of the customer.

Thank you very much and best regards

Ermes

Parents
  • What version are you using?

    What is the error message in detail?

  • Hi Markus

    I am using the 8.0.1 version.

    The error message is:

    CCC_Update_Dummy_From_Person: Error occurred during assignment of Old person CRM Account to  new dummy for person LUCA ROMANO ---------->System.AggregateException: One or more errors occurred. ---> VI.Base.ViException: UNSAccountB: Write permission denied for value "UID_Person".
       at VI.DB.Entities.DelayedLogicSaveEntityStrategy.<OnSavingAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at VI.DB.Entities.DbEntitySink.<PutAsync>d__14.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at VI.DB.Entities.UnitOfWorkImpl.<PutAsync>d__37.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at VI.DB.Entities.EventUnitOfWork.<PutAsync>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at VI.DB.Entities.PermissionsUnitOfWork.<PutAsync>d__11.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at VI.DB.Entities.EventUnitOfWork.<PutAsync>d__2.MoveNext()
       --- End of inner exception stack trace ---
       at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
       at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
       at VI.Base.SyncActions.Do(Func`1 action)
       at VI.DB.Sync.SyncUnitOfWorkExtensions.Put(IUnitOfWork unitOfWork, IEntity entity, PutOptions options)
       at DynScripts.CustomerScripts.Service.Persist(IEntity Entity)
       at DynScripts.CustomerScripts.CCC_Update_Dummy_From_Person(String UID_Person)
    ---> (Inner Exception #0) VI.Base.ViException: UNSAccountB: Write permission denied for value "UID_Person".
       at VI.DB.Entities.DelayedLogicSaveEntityStrategy.<OnSavingAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at VI.DB.Entities.DbEntitySink.<PutAsync>d__14.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at VI.DB.Entities.UnitOfWorkImpl.<PutAsync>d__37.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at VI.DB.Entities.EventUnitOfWork.<PutAsync>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at VI.DB.Entities.PermissionsUnitOfWork.<PutAsync>d__11.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at VI.DB.Entities.EventUnitOfWork.<PutAsync>d__2.MoveNext()<---

    Thank you very much and best regards

    Ermes

  • Does your UNSAccountB has an account definition assigned? (UID_TSBAccountDef)

    Or is your account marked as outstanding or to-be-deleted?

  • Yes, the UNSAccountB has a account definition assigned and it is full managed.

    No it is not marked as outstanding or to-be-delete.

  • You cannot change the UID_Person as long as the account definition is assigned to the account (remember the account definition is also assigned to the Person via the assignment table PersonHasTSBAccountDef).

    You need to call the customizer method RevokeAccountDef at the UNSAccountB object. This turns your user account into a linked account only and you are able to change the person.

Reply
  • You cannot change the UID_Person as long as the account definition is assigned to the account (remember the account definition is also assigned to the Person via the assignment table PersonHasTSBAccountDef).

    You need to call the customizer method RevokeAccountDef at the UNSAccountB object. This turns your user account into a linked account only and you are able to change the person.

Children