Best way to support large picklist in Salesforce - salesforce

I have got more than 100 values in the picklist ,What is the best way to manage large picklist values in salesforce.

The specific limitations on picklist value set size are well-documented, and there's no way to get around them. You may be limited to 100 (or even 50) if you're working with a specific standard picklist. However, custom picklists can have up to 1,000 entries.

Related

Azure form-recognizer - prebuilt-invoice doesnt recognize currency, other custom fields

Azure form-recognizer, prebuilt-invoice doesnt recognize currency and some of my other custom fields from my invoice pdf. General Document gets me all key values. But for General document keyvalues I need to write algorithm to categorize the invoice related fields, which are already done in prebuilt-invoice.
I need all keyvalues from prebiult-invoice api, so I can find the missing elements by myself.
Anybody faced this? how do you overcome? one way I think of is, we can call both apis for same document. But it affects performance and increases cost.
any suggestion?

CouchBase view get for multiple ranges

I'm evaluating CouchBase for an application, and trying to figure out something about range queries on views. I know I can do a view get for a single key, multiple keys, or a range. Can I do a get for multiple ranges? i.e. I want to retrieve items with view key 0-10, 50-100, 5238-81902. I might simultaneously need 100 different ranges, so having to make 100 requests to the database seems like a lot of overhead.
As far as I know in couchbase there is no way to implement getting values from multiple ranges with one view. May be there are (or will be implemented in future) some features in Couchbase N1QL, but I didn't work with it.
Answering your question 100 requests will not be a big overhead. Couchbase is quiet fast and it's designed to handle a lot of operations per second. Also, if your view is correctly designed, it will not be "recalculated" on each query.
Also there is another way:
1. Determine minimum and maximum value of your range (it will be 0..81902 according to your example)
2. Query view that will return only document ids and a value that range was based on, without including all docs in result.
3. On client side filter array of results from previous step according to your ranges (0-10, 50-100, 5238-81902)
and then use getMulti with document ids that left in array.
I don't know your data structure, so you can try both ways, test them and choose the best one that will fit your demands.

Database schema for calendar application

I'm creating a calendar application in which each date has one of 3 states: available, maybe available, and unavailable. Trying to figure out the best schema for this situation.
One thought might be to have a UserDate model with a field state. The problem with this is that the DB will have #-of-users- x 365 rows for each year - seems like it would grow too quickly for a modestly sized app.
Another thought might be to have a default state, and only create a UserDate object when the user has signified that their availability on that date is different from the default. This seems convoluted though.
Has anyone dealt with this situation before? Any suggestions on the best way to go about this?
When you create a new user, you do not want to be inserting records for the next 50 years of their life. Only creating the UserDate object when there is a non-default value is what you should do.
You could consider storing a range of dates for a user if you are likely to have lots of consecutive dates with the same status. For example, if they are unavailable for all of December, then this could be represented as a single row.
Think about the sort of information you want to extract from your database, and how difficult this will be with each of your possible designs.

Please help me choose a database design for my project.

I want to use a database for a program I'm creating. Let's say that I will have to manage clients that can make "posts" and every post has a series of properties.
To store the information about the users I have created a table. I'm not sure how to design the table for "posts". Every post has some properties that are text and about ten boolean properties.
My question is: Would it be better to have only one column with a Y,N,N,Y.... and then do a split in the program to know every status of these properties or is it better to have every property in a column with a boolean type?
I anticipate large number of clients and a large number of posts so I don't know if this last option is faster and cheaper or not. What do you think? My program will serve data to mobile phones.
It is better to have a column for each of the boolean properties, I would also recommend using a bit, or tinyint column with 1, 0 values instead of Y/N as they take up less space and are easier to manipulate for reporting purposes

Managing rank of records via apex in salesforce.com

I have a requirement I'd like to get some input on. I need to have an "account rank" field that will not include all accounts and I will need to be able to add to the pool, remove from the pool, and change rank. My problem is that each time I remove a record from the pool or move it to a new position, all records after (which could be as many as 10,000) will need to be shifted up or down. Salesforce has limits on individual updates of 200 at a time, or you can split it up into batches of up to a million. My concern with batches is I won't be able to guarantee that people won't update more than 5 records in a short time, therefore reaching past the salesforce limits on total # of batches allowed.
Has anyone dealt with these issues and do you have any suggestions for a best approach?
(I'd post this as a comment but I'm new and can't do that yet. Sorry).
I can't think of a good way to model this in the way you describe without resorting to some pretty custom apex using #future or batch, or having your own integration that does this recalculation through the salesforce API.
What determines account rank? Can you calculate it inside of a formula field?
This is a tough one... Can you re-think about this to somehting more SFDC-like? What if you were to generate the ranks on a dinamic way? You could for example create a voting system, or some grading system and have SFDC calculate the ranking for you.
Let's say you have one or more fields where you give a grade then have a SOQL query like this:
[SELECT ID FROM Account WHERE _ ORDER BY Vote1, Vote2, ]
If you change your Data Model it should make this quite easy e.g.
Create a ranking object Ranking__c and associate this with the Account object.
For each rank type or number create
a record with the details.
Associate the appropriate Account
records with the corresponding
Ranking__c record
When it's time to update an Accounts rank just change the Ranking__c records instead of the Account records. This should massively reduce the number of records you'd need to run over.

Resources