function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ahonahon 

I want to create a record, and this object should only have a single record in the entire org.

I want to create a record, and this object should only have a single record in the entire org. Do you know what the best solution is?
Best Answer chosen by ahon
ahonahon
Solution: get records, create a decision element that checks for null; if null, allow user to create new records; if not null, user cannot create new record.

All Answers

HarshHarsh (Salesforce Developers) 
Hi Ahon,
Please follow the following link of Stack Exchange for the answer.

https://salesforce.stackexchange.com/questions/412635/limit-1-record-per-object?noredirect=1#comment590839_412635 

Please mark it as Best Answer if the above information was helpful.

Thanks.
 

Important Update

We appreciate your participation in these Salesforce Discussion Forums! It’s active members like you that keep our amazing community going strong.

At this time, we want to give you a heads up that on December 4, 2023, the discussion forums will shut down. This move brings all conversations around Salesforce development together in one place and provides more opportunities for our broader community to connect and share. We will be removing outdated, obsolete, or spam content and migrating only relevant discussions to the Trailblazer Community digital platform.

During the week starting November 20, you can view discussions but not post new questions or responses. On December 2, you will no longer be able to access the discussion forums from the Salesforce Developers website.

Please take these steps before December 1 to ensure your contributions follow you to the Trailblazer Community:

  1. If you’re not already a member of the Trailblazer Communitysign up for a Trailblazer account using the same login email address associated with your Developer Discussion Forums account. This is crucial.
  2. If you already have a Trailblazer account, and it’s using a different email from your Developer Discussion Forums email (aoneill@sgintl.com), we recommend that you log in to the Trailblazer Community and connect your forums email to your Trailblazer account.

Once you’re in the Trailblazer Community, join the Developer Forums Support Hub users group to help you navigate this transition.

We will keep you up to date throughout the transition, and we look forward to seeing you joining the developer discussions in the Trailblazer Community!

Sincerely,
The Forums Support Team

ahonahon
Solution: get records, create a decision element that checks for null; if null, allow user to create new records; if not null, user cannot create new record.
This was selected as the best answer