0

Is it possible to use schema class in Salesforce Flow without calling Apex? For example, is it possible to declare a variable, or a record choice set by using for example:

Lead.SObjectType.getDescribe().getRecordTypeInfos()

Or this has to do only with Apex coding ?

In my org users can change their locale and use Greek or English Language. So what i want to do is to get the Record Types of Lead and also to show their name field in the respective language (English or greek depending on the user's locale). I have tried to get the Record Types of the Lead Object and store them in a record choice set. I am doing it, but the name field is always in English. enter image description here

Then, i tried to use the RecordTypeLocalization object, but my problem is that i cannot ensure somehow that i will take the Lead's Record Types. It will actually get all the record types for all objects, since i, unfortunately, do not have the ability on my fiters to set Parent.Sobject = 'Lead'. Any suggestions on how i could solve my issue? enter image description here

1

The line Account.SObjectType.getDescribe().getRecordTypeInfos() is an apex code line so it would work only in Apex class/trigger.

The declarative way to do it would be to use the get record element on the RecordType object or you can create generic plugin to do that which will require some Apex code.

Updated:

For getting localized strings, you need do a query on RecordType and store the Id, then you can query on the RecordTypeLocalization object specifying the condition. ParentId in RecordTypeIds. Then you can pass Parent Id forward when user selects the Record Type

| improve this answer | |
  • Hi manjit5190 and thank you for your answer. I edited a bit the question in order to refer to the actual problem i am facing. I would appreciate it if you could give me a suggestion. Thanks! – Giorgos Galaios Apr 30 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.