Hi Rick,
As you rightly argued, I don't think AutoNumber are suitable anymore with your requirements. I think you’ll need to manually calculate the membership numbers on membership creation. During membership creation, you can retrieve the last membership (retrieve First Membership associated to the Org sorted by MembershipNumber descending) and add 1 to that number. This way you can maintain separate counters for each Org.
The only issue to be aware of is if requests are handled at the same time, two membership number can have the same membership number. If you want to be absolutely sure of uniqueness, I think you'll have to look into a database lock between retrieval and committing. I’m not too familiar with that myself, but I think this module can help: https://marketplace.mendix.com/link/component/109405
Hi Rick,
Have you tried with Before Commit event on Membership entity?
If not Create an BCo_Microflow and configure that in Membership entity Event Handler.
In that microflow reterive the latest committed object and +1 to the attribute.