SAAS ID Counts

2
I am working on a project where we are trying to build a SAAS application and I was wondering if anyone had experience with managing ID's across different companies. So for instance one company has several quotes and their ID's will need to go 1,2,3,4 and company 2's quotes id could be 1,2,3,4 as well. But this could be on several different objects and i want to try to make this as generic as possible. Also there is an additional level of complexity whereby company one could have multiple locations and those locations would have the quote id as 1,2,3,4 and 1,2,3,4. Does anyone have any ideas?
asked
2 answers
2

I have the same challenge in a different context. I guess you need a reference to your SAAS identity in every entity, in order to make sure that your user only sees records from his own SAAS identity, and not eg the quotes of other SAAS companies.

Did you consider to make your own incremental number logic in a microflow, using this SAAS identity link in combination with a lastNr field on with your SAAS identity object?

when creating (or better saving) a new record, it looks the lastnr for this SAAS identity, adds 1, and updates the lastNr info.

answered
-1

I usually prefer random IDs (see community commons randomGUID function) above (scoped) (auto)numbers. Easier to maintain and more reliable if concurrent writes / creates can occur.

answered