1

Basically I want to use the UI-API to get dependent picklist values to use in custom lightning page. To access the ui-api, I need to make rest callout from apex. So I created a connected App and Auth Provider with same client Id and secret. While configuring Named credentials, it fails to authorize the changes while saving.

I am getting "OAUTH_APPROVAL_ERROR_GENERIC : An unexpected error has occured during authentication. Please try again." while trying to save the Named Credentials for the same Org.

I need answers for the following questions. 1. Can I access ui-api within same salesforce org ? 2. Is there any other way to get dependent picklist and recordtype based picklist?

2

I was able to make it working after starting fresh following the steps in https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm and Oauth Configuration using connected apps and Auth provider.

For my second question in final sentence, this can be achieved using lightning recordeditform and lightning inputfield from spring 18 release.

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.