Update Manager name in CVOC object When Change in the User Object Automatically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msonu719
    Junior Member
    • Aug 2024
    • 13

    Update Manager name in CVOC object When Change in the User Object Automatically

    Hi team,

    I have a field in the CVOC object with the name manger1 so i want it to be update automatically when change in the manager name in User Object.
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #2
    Hi msonu719,

    Please tell me what relationships are set between CVOC and User entities? You can check it in the Administration > Entity Manager > CVOC > Relationships.

    Comment


    • msonu719
      msonu719 commented
      Editing a comment
      In CVOC i have created a field team member 1 with lookup field on that bases i write the formula to get the data in the manager1 field the formula is

      manager1 = teamMember1.cManagerNameName;

      From this I get the manager name but when i change manager name in the User but it will not update in CVOC object automatically whenever i refresh the page or directly reflect in the CVOC object.
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #3
    msonu719,

    You need to use a formula script for the User entity. E.g., when a certain field is User record changes, you need to update the field in the related CVOC record:
    Code:
    if (entity\isAttributeChanged('username') {
      record\update('CVOC', cvocId, 'manager1', username)
    }

    Comment

    Working...