Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Markus Johansson 1945 posts 5899 karma points MVP 3x c-trib
    Sep 27, 2021 @ 20:12
    Markus Johansson
    0

    Setting default value when member is created

    Hi!

    I was looking for a way to set some default values for a member when it’s created.

    Looked at the “Saving”-event on the MemberService, figured I’ll check if member.Id == 0 and then set values. But it turns out that the event is called three times when a member is created and any values set the 1st or 2nd time is not stored. Hacked around this to set the values the 3rd time the event is called - but it feels externally hacky.

    Is there any other known way to this? It needs to work when members are created in the backoffice or via the the MemberService.

    / m

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies