• David Tissen 11
  • NEWBIE
  • 5 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Facing a strange behaviour since Winter 24' Update with CRM Analytics and Bindings.

Most of my Widgets use bindings as DataSource Filters. These Bindinds worked perfectly until Winter 24' Release and showed the expected Data. For Example:
"SalesData": {
                "filters": [
                    [
                        "Order.Store__c",
                        "{{column(GroupFilter_1.result, [\"ChildAccount__c\"]).asObject()}}",
                        "in"
                    ],
                    [
                        "Order.Store__c",
                        "{{column(ChannelFilter_1.result, [\"ChildAccount__c\"]).asObject()}}",
                        "in"
                    ],
                    [
                        "Order.Store__c",
                        "{{column(TerritoryFilter_1.result, [\"ObjectId\"]).asObject()}}",
                        "in"
                    ]
                ]
            }

Since Winter 24' the Widget does not show anything until i select an Value from GroupFilter_1 or ChannelFilter__1.
Both Bindings contains data around 5000 till 10.000 rows which are used to filter the Dataset.

Any Idea what changes within Winter 24' could explain the different behaviour?
Facing a strange behaviour since Winter 24' Update with CRM Analytics and Bindings.

Most of my Widgets use bindings as DataSource Filters. These Bindinds worked perfectly until Winter 24' Release and showed the expected Data. For Example:
"SalesData": {
                "filters": [
                    [
                        "Order.Store__c",
                        "{{column(GroupFilter_1.result, [\"ChildAccount__c\"]).asObject()}}",
                        "in"
                    ],
                    [
                        "Order.Store__c",
                        "{{column(ChannelFilter_1.result, [\"ChildAccount__c\"]).asObject()}}",
                        "in"
                    ],
                    [
                        "Order.Store__c",
                        "{{column(TerritoryFilter_1.result, [\"ObjectId\"]).asObject()}}",
                        "in"
                    ]
                ]
            }

Since Winter 24' the Widget does not show anything until i select an Value from GroupFilter_1 or ChannelFilter__1.
Both Bindings contains data around 5000 till 10.000 rows which are used to filter the Dataset.

Any Idea what changes within Winter 24' could explain the different behaviour?
We have configured an auth provider using open id connect and created registration handler to create and update user. I have a requirement to get the ID Token as well. so I tried to use String token = Auth.AuthToken.getAccessToken(authproviderId, 'Open ID connect') where authproviderId is the ID of the provider that I configured. This token value always returns null. Can anyone help me with this issue? Appreciate your response. Thanks!
Hi all,

Due to the issue I have described here: https://developer.salesforce.com/forums#!/feedtype=SINGLE_QUESTION_DETAIL&dc=Developer_Forums&criteria=OPENQUESTIONS&id=9060G0000005f11QAA, I have attempted to get a new OAuth access token programmatically using the usage notes for Auth.AuthToken.refreshAccessToken in the documentation here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Auth_AuthToken.htm#apex_class_Auth_AuthToken. For convenience, the usage example is:
 
String accessToken = Auth.AuthToken.getAccessToken('0SOD000000000De', 'Open ID connect');
Map<String, String> responseMap = Auth.AuthToken.refreshAccessToken('0SOD000000000De', 'Open ID connect', accessToken);
I am doing pretty much the same in exec anon:
 
AuthProvider pcs = [SELECT Id FROM AuthProvider WHERE DeveloperName = 'PCS'];
String accessToken = Auth.AuthToken.getAccessToken(pcs.Id, 'Open ID Connect');
Auth.AuthToken.refreshAccessToken(pcs.Id, 'Open ID Connect', accessToken);

The following exception is thrown in that code when I call refreshAccessToken: "System.InvalidParameterValueException: Argument cannot be null or empty".  Debugging "accessToken" reveals that it is null.  However, as far as I am concerned, it shouldn't be as I have passed the correct auth provider id and provider type.

This is my Auth. Provider config:

Auth Provider
This is the named credential that uses it:

Named Credential

I've tried with both Named Prinicipal and Per User.  Can anyone assist me with getting this to work?

Many thanks,

Miles

I am attempting to programmatically archive Attachments in Salesforce over to Google Drive. Google Drive API requires OAuth and I am having a little bit of trouble setting it up.

I was trying to avoid building and parsing HTTP Requests/Responses in order to get through the Authorization Flow but my attempts have failed.

First, I configured an API Project via the Google API ConsoleUser-added image

Second, I created an AuthProvider in Salesforce.
User-added image

At this point, I would expect the following code sample to grab an Access Token for me:
system.debug(Auth.AuthToken.getAccessToken('0SO4B000000CacK', 'Open ID Connect'));
However, I receive a null value.

For good measure, duplicated everything for a Google Auth Provider, instead of  Open Id Connect with the same result. I also set up an external data source (which does authenticate and sync) to make sure I had a token.

Has anyone been able to successfully use AuthToken methods when connecting to Google APIs?
Is there anything that I missed along the way?