I'm working with data via API that uses composite keys and need to store the data in Record type. However, I understand that composite keys are not supported in record types. Could anyone suggest a way to handle this situation or provide any workarounds?
Discussion posts and replies are publicly visible
Did you consider to just concatenate the key values into a single text field? Maybe in addition to the original fields which then will not be used as keys anymore.
I could not concatenate the key values since one of them has date datatype, but I tried to create a random field to have it as ID and then to leave it as primary, but we are reading data from a web service therefore we couldn't sync a record type without having initially a unique primary key, so even if I create a custom field I could not mark it as primary
I do not understand why you could not concatenate a date field ?!?
I was not talking about a custom record field, but about a normal text field in the database to hold that merged key. Then this can act as PK in the DB and in the record.
Concatenated key is the only way to do it.
But we do not have that table in our database and the API is not prepared only for us so concatenating the fields in database is not an option.
We thought of this but since this is not an option from the other team I asked here if there is any other way we can handle this problem.
thanks
Above, you wrote "need to store the data in Record type". This translates to you having a table in the database. And when receiving the data, you could just transform it to your needs.
I do not see any issue ...