1

Feels like a general question, but thought to put in discussion.

Need to connect to an external system from salesforce and Oauth flow is ok. First though to store access_token, refresh_token, etc. in custom settings but max length doesn't allow to do it.

Any workaround for live with custom settings or any alternative? Wasting one more custom object just for this is the only option what I can think of.

2
  • What do you mean with "in custom settings but max length doesn't allow to do it". I use custom settings as storage for my OAuth flow, and field length is no issue. Aug 27, 2015 at 11:38
  • probably you are using text field and it only allows maximum 255 characters. But the tokens I'm receiving are too lengthy.
    – highfive
    Aug 27, 2015 at 15:01

1 Answer 1

2

Instead of using a Custom Setting, use a custom object with name/value pairs per record. To avoid multiple queries when using this in apex, maybe load all records into a map.

Before edit:

You could use Textarea (Long), which provides space for 131,072 characters.

1
  • It also only for 255 chars in custom settings, am breaking the token and storing in several fields ATM
    – highfive
    Aug 28, 2015 at 10:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .