Run Data Source Action does not execute Apex in Lighting Page, but does in Preview

I have a Skuid Page that I have placed on a Lightning Page.
The Page has a Table with a Row action that includes an Action Type Run Data Source Action.
The Action is Apex and includes several invocable variables used to pass data from the skuid page to an external system.
This is functioning beautifully when I view it in Preview, but when the button is clicked from the Skuid component on a lightning page, it does not work.

I checked the XHR logs on the page from both the preview and the lightning Page.
The results were different and confirm that the apex action (SendParameters) is not occurring from the lightning page.

Here are the XHR Logs I’m getting in both scenarios:

Any help would be greatly appreciated.

Sorry to hear that you’re having trouble with this in Lightning. One thing to know is that, in Lightning, the network requests that end with “skuid.SkuidLightning.proxy=1” are where Skuid makes the Data Source Action request to Lightning — in Lightning we are not able to make direct network requests to Salesforce’s own API’s (a very frustrating limitation of Lightning), so we have to make proxied requests. So if you inspect the “proxy” requests a bit deeper, you’ll see that this is where the Data Source Action calls to your SendParameters invocable action are being made.

That said, this is where we’d need to dig into in order to be able to help you debug further — can you click on the “.proxy” requests and copy and paste the contents of the response that’s coming back from the server?

OR, if you grant login access to Skuid Support and post your Org Id and a link to where you’re experiencing this, we can go investigate on our own and save you the trouble of copying and pasting anything :slight_smile:

Zach,

I really appreciate you digging into this for me.
I am not able to grant login access to our production org, but could do so in a sandbox if need be.

Here are the details of the two proxy requests.


aura?r=46&skuid.SkuidLightning.proxy=1

{“actions”:[{“id”:“2475;a”,“state”:“SUCCESS”,“returnValue”:“{"statusCode":200,"status":"OK","setCookies":[{"value":"noXQd3YoT0iua7X-Tvkwzw","secure":false,"path":"/","name":"BrowserId","httpOnly":false,"expires":"Sat, 27-Jul-2019 13:25:19 GMT","domain":".salesforce.com"},{"value":"5184000","secure":false,"path":null,"name":"Max-Age","httpOnly":false,"expires":null,"domain":null}],"headers":{"Expect-CT":"max-age=0; report-uri=\"https://a.forcesslreports.com/Expect-CT-report/00Df2000001HG6em\";","Sforce-Limit…; mode=block","Expires":"Thu, 01 Jan 1970 00:00:00 GMT","Vary":"Accept-Encoding","Cache-Control":"no-cache,must-revalidate,max-age=0,no-store,private","Strict-Transport-Security":"max-age=31536002; includeSubDomains","X-Robots-Tag":"none","Date":"Tue, 28 May 2019 13:25:19 GMT","Public-Key-Pins-Report-Only":"pin-sha256=\"9n0izTnSRF+W4W4JTq51avSXkWhQB8duS2bxVLfzXsY=\"; pin-sha256=\"5kJvNEMw0KjrCAu7eXY5HZdvyCS13BbA0VJG1RSP91w=\"; pin-sha256=\"njN4rRG+22dNXAi+yb8e3UMypgzPUPHlv4+foULwl1g=\"; max-age=86400; includeSubDomains; report-uri=\"https://a.forcesslreports.com/hpkp-report/00Df2000001HG6em\";","X-Content-Type-Op… to Chatter\",\"name\":\"chatterPost\",\"type\":\"CHATTERPOST\",\"url\":\"/services/data/v42.0/actions/standard/chatterPost\"},{\"label\":\"Enable Folder Support for a Content Workspace (Library)\",\"name\":\"contentWorkspaceEnableFolders\",\"type\":\"CONTENTWORKSPACE_ENABLE_FOLDERS\",\"url\":\"/services/data/v42.0/actions/standard/contentWorkspaceEnableFolders\"},{\"label\":\"Send Email\",\"name\":\"emailSimple\",\"type\":\"EMAILSIMPLE\",\"url\":\"/services/data/v42.0/actions/standard/emailSimple\"},{\"label\":\"Submit for Approval\",\"name\":\"submit\",\"type\":\"SUBMITAPPROVAL\",\"url\":\"/services/data/v42.0/actions/standard/submit\"},{\"label\":\"Deactivate Session-Based Permission Set\",\"name\":\"deactivateSessionPermSet\",\"type\":\"DEACTIVATE_SESSION_PERM_SET\",\"url\":\"/services/data/v42.0/actions/standard/deactivateSessionPermSet\"},{\"label\":\"Activate Session-Based Permission Set\",\"name\":\"activateSessionPermSet\",\"type\":\"ACTIVATE_SESSION_PERM_SET\",\"url\":\"/services/data/v42.0/actions/standard/activateSessionPermSet\"},{\"label\":\"Choose Price Book\",\"name\":\"choosePricebook\",\"type\":\"CHOOSE_PRICEBOOK\",\"url\":\"/services/data/v42.0/actions/standard/choosePricebook\"}]}"}”,“error”:,“storable”:true}],“context”:{“mode”:“PROD”,“app”:“one:one”,“pathPrefix”:“”,“fwuid”:“pxtF0ZdGYF-z00XsmRUcGQ”,“uad”:1,“descriptorUids”:{},“loaded”:{“APPLICATION@markup://one:one”:“Vel2xmipbW6B0F2Wfw22YA”},“globalValueProviders”:[{“type”:“$SObjectType”,“values”:{“CurrentUser”:{“isChatterEnabled":true,“Email”:"avanhecke@behavecare.us”,“Id”:“005f2000008mjMeAAI”}}},{“type”:“$Locale”,“values”:{“userLocaleLang”:“en”,“userLocaleCountry”:“US”,“language”:“en”,“country”:“US”,“variant”:“”,“langLocale”:“en_US”,“nameOfMonths”:[{“fullName”:“January”,“shortName”:“Jan”},{“fullName”:“February”,“shortName”:“Feb”},{“fullName”:“March”,“shortName”:“Mar”},{“fullName”:“April”,“shortName”:“Apr”},{“fullName”:“May”,“shortName”:“May”},{“fullName”:“June”,“shortName”:“Jun”},{“fullName”:“July”,“shortName”:“Jul”},{“fullName”:“August”,“shortName”:“Aug”},{“fullName”:“September”,“shortName”:“Sep”},{“fullName”:“October”,“shortName”:“Oct”},{“fullName”:“November”,“shortName”:“Nov”},{“fullName”:“December”,“shortName”:“Dec”},{“fullName”:“”,“shortName”:“”}],“nameOfWeekdays”:[{“fullName”:“Sunday”,“shortName”:“SUN”},{“fullName”:“Monday”,“shortName”:“MON”},{“fullName”:“Tuesday”,“shortName”:“TUE”},{“fullName”:“Wednesday”,“shortName”:“WED”},{“fullName”:“Thursday”,“shortName”:“THU”},{“fullName”:“Friday”,“shortName”:“FRI”},{“fullName”:“Saturday”,“shortName”:“SAT”}],“labelForToday”:“Today”,“firstDayOfWeek”:1,“timezone”:“America/New_York”,“dateFormat”:“MMM d, yyyy”,“shortDateFormat”:“M/d/yyyy”,“longDateFormat”:“MMMM d, yyyy”,“datetimeFormat”:“MMM d, yyyy h:mm:ss a”,“shortDatetimeFormat”:“M/d/yyyy h:mm a”,“timeFormat”:“h:mm:ss a”,“shortTimeFormat”:“h:mm a”,“numberFormat”:“#,##0.###”,“decimal”:“.”,“grouping”:“,”,“zero”:“0”,“percentFormat”:“#,##0%”,“currencyFormat”:“¤#,##0.00;(¤#,##0.00)”,“currencyCode”:“USD”,“currency”:“$”,“dir”:“ltr”,“lang”:“en-US”,“isEasternNameStyle”:false}},{“type”:“$Browser”,“values”:{“containerVersion”:“”,“isWEBKIT”:true,“isIE11”:false,“formFactor”:“DESKTOP”,“isWindowsTablet”:false,“isIE10”:false,“isPhone”:false,“isContainer”:false,“S1Features”:{“isOfflineEnabled”:true,“isNativePrimingEnabled”:true,“areOfflineDraftsEnabled”:false,“isAsyncSaveEnabled”:false,“isOfflineQuickActionDraftsEnabled”:false,“isMobilePageRefEnabled”:false,“hasLightningOnMobile”:false,“hasLexOnMobilePageRef”:false,“isTabBarEnabled”:false,“isUitrkLoggingEnabled”:true,“isAuraParallelBootstrapLoadEnabled”:true,“useNativeScroller”:true,“isTodayPreviewEnabled”:false,“isEclairAdvancedFeaturesEnabled”:false,“isSFXUrlFormatSupported”:true,“isEncryptedStorageEnabled”:true,“isAccountSuggestionsEnabled”:true,“isAccountLogoEnabled”:true,“isSFXInlineEditListViewEnabled”:true,“isLVMInAppBuilderEnabled”:true,“isS1RecordInlineEditEnabled”:false,“isListViewGroupShareEnabled”:true,“isLightningConsoleSplitViewEnabled”:false,“isSocialInsightsLogoAdmin”:true,“shouldShowEinsteinInsightsHome”:false,“homeAssistantCollapseCards”:false,“isPersonAccountsEnabled”:false,“isPersonAccountsApiLightningEnabled”:false,“isFilesSharingPrivacyEnabled”:true,“isFlexipageActionSchedulingEnabled”:true,“orgHasEinsteinInsightsEnabled”:false,“orgHasLightningLiveAgent”:false,“sfxRecordPreviewsOff”:false,“isFlexipageDeprecatedRendererEnabled”:false,“isRaptorRecordHomeFlexipageEnabled”:false,“isLWCFlexipageCustObjDsktpRH”:false,“isLwcFlexipageAllObjDskRH”:false,“isLwcFlexipageAllObjMblRH”:false,“useHotspotForAuraCmpsInLWCFLexipage”:true,“isExecuteHotSpotForLDS”:false,“isLDSRecordsDebug”:false,“useACTRecordLayoutForStandardObjects”:false,“useACTRecordLayoutForEdit”:false,“useACTRecordLayoutForCustomObjects”:false,“recordDataInvalidation”:false,“forceReloadRecordForInlineEdit”:false,“calendarAnythingAllowed”:true,“isMultiUserOrgEnabled”:true,“isEinsteinAssistantEnabled”:false,“isEinsteinAssistantPrefEnabled”:false,“isEinsteinBuilderEnabled”:false,“isEinsteinBuilderLicenseEnabled”:false,“isEinsteinBuilderPrefEnabled”:false,“isEinsteinBuilderStartedPrefEnabled”:false,“isEinsteinEverywhereEnabled”:false,“isAiEverywhereEnabled”:true,“isEinsteinMsaAcceptedEnabled”:false,“isEnhancedTemplatesEnabled”:false,“orgHasMatchedLeadsEnabled”:false,“isForceRefreshViewEnabled”:false,“useRaptorAlohaPage”:true,“isEngagementScoreVisible”:false,“isLeadScoreVisible”:false,“isLeadScoreSetupV3”:false,“useLexiCallbackReturnUrl”:true,“isTaskListViewsDisabled”:false,“isPopOutUtilitiesEnabled”:false,“useLightningReportBuilder”:false,“isReportEnhancedRunPageEnabled”:true,“useAntiPopcorn”:false,“recordChangeCapture”:false,“showTaskInfoPopover”:false,“isRaptorActionsContainerEnabled”:false,“isLwcFlexipageFullExpansionEnabled”:false,“isFormsEnabled”:false,“useQueryParamWhiteList”:false,“isChatterFeedOnlyInConsole”:false,“isCompactFeedInSfx”:false,“hasAutoTransitionPerm”:false,“hasOptedOutAutoTransition”:false,“hasFinishedAutoTransition”:false,“isScheduledSwitcherEnabled”:true,“isScheduledSwitcherFrequencyDaily”:false,“honorTargetInFormula”:false,“refreshOnInvalidSession”:false,“isNewRecordWrapperEnabled”:false,“isNewRecordWrapperEnabledStdApps”:false,“useDoubleIframe”:false,“isGlobalEventBusPilotEnabled”:false,“isLVMPinnedListOff”:false,“isTemplateEnhancedFolderPrefEnabled”:false,“orgCanAccessLtngTempFolder”:false,“isSCEFreemiumEnabled”:false,“isOpptyScoreEnabled”:false,“isOpptyScoreUserPermEnabled”:false,“hasAccessToCadenceWho”:false,“isLexEndUserNoSwitchingEnabled”:false},“isBlackBerry”:false,“isIE7”:false,“isFIREFOX”:false,“isIE6”:false,“isIE9”:false,“isIE8”:false,“isDesktop”:true,“isWindowsPhone”:false,“isTablet”:false,“isIPad”:false,“isOSX”:false,“isAndroid”:false,“isIPhone”:false,“isIOS”:false}},{“type”:“$ComponentLibrary”,“values”:{“isDSC”:false,“playgroundURL”:“https://d3nm9grey5nsoo.cloudfront.net”,“lockerServiceHostURL”:"https://tools-loc…}


aura?r=47&skuid.SkuidLightning.proxy=1

{“actions”:[{“id”:“2476;a”,“state”:“SUCCESS”,“returnValue”:“{"statusCode":200,"status":"OK","setCookies":[{"value":"bj8FVagpTjaNFzhnqFdH-A","secure":false,"path":"/","name":"BrowserId","httpOnly":false,"expires":"Sat, 27-Jul-2019 13:25:20 GMT","domain":".salesforce.com"},{"value":"5184000","secure":false,"path":null,"name":"Max-Age","httpOnly":false,"expires":null,"domain":null}],"headers":{"Expect-CT":"max-age=0; report-uri=\"https://a.forcesslreports.com/Expect-CT-report/00Df2000001HG6em\";","Sforce-Limit…; mode=block","Expires":"Thu, 01 Jan 1970 00:00:00 GMT","Vary":"Accept-Encoding","Cache-Control":"no-cache,must-revalidate,max-age=0,no-store,private","Strict-Transport-Security":"max-age=31536002; includeSubDomains","X-Robots-Tag":"none","Date":"Tue, 28 May 2019 13:25:20 GMT","Public-Key-Pins-Report-Only":"pin-sha256=\"9n0izTnSRF+W4W4JTq51avSXkWhQB8duS2bxVLfzXsY=\"; pin-sha256=\"5kJvNEMw0KjrCAu7eXY5HZdvyCS13BbA0VJG1RSP91w=\"; pin-sha256=\"njN4rRG+22dNXAi+yb8e3UMypgzPUPHlv4+foULwl1g=\"; max-age=86400; includeSubDomains; report-uri=\"https://a.forcesslreports.com/hpkp-report/00Df2000001HG6em\";","X-Content-Type-Op… d, yyyy”,“shortDateFormat”:“M/d/yyyy”,“longDateFormat”:“MMMM d, yyyy”,“datetimeFormat”:“MMM d, yyyy h:mm:ss a”,“shortDatetimeFormat”:“M/d/yyyy h:mm a”,“timeFormat”:“h:mm:ss a”,“shortTimeFormat”:“h:mm a”,“numberFormat”:“#,##0.###”,“decimal”:“.”,“grouping”:“,”,“zero”:“0”,“percentFormat”:“#,##0%”,“currencyFormat”:“¤#,##0.00;(¤#,##0.00)”,“currencyCode”:“USD”,“currency”:“$”,“dir”:“ltr”,“lang”:“en-US”,“isEasternNameStyle”:false}},{“type”:“$Browser”,“values”:{“containerVersion”:“”,“isWEBKIT”:true,“isIE11”:false,“formFactor”:“DESKTOP”,“isWindowsTablet”:false,“isIE10”:false,“isPhone”:false,“isContainer”:false,“S1Features”:{“isOfflineEnabled”:true,“isNativePrimingEnabled”:true,“areOfflineDraftsEnabled”:false,“isAsyncSaveEnabled”:false,“isOfflineQuickActionDraftsEnabled”:false,“isMobilePageRefEnabled”:false,“hasLightningOnMobile”:false,“hasLexOnMobilePageRef”:false,“isTabBarEnabled”:false,“isUitrkLoggingEnabled”:true,“isAuraParallelBootstrapLoadEnabled”:true,“useNativeScroller”:true,“isTodayPreviewEnabled”:false,“isEclairAdvancedFeaturesEnabled”:false,“isSFXUrlFormatSupported”:true,“isEncryptedStorageEnabled”:true,“isAccountSuggestionsEnabled”:true,“isAccountLogoEnabled”:true,“isSFXInlineEditListViewEnabled”:true,“isLVMInAppBuilderEnabled”:true,“isS1RecordInlineEditEnabled”:false,“isListViewGroupShareEnabled”:true,“isLightningConsoleSplitViewEnabled”:false,“isSocialInsightsLogoAdmin”:true,“shouldShowEinsteinInsightsHome”:false,“homeAssistantCollapseCards”:false,“isPersonAccountsEnabled”:false,“isPersonAccountsApiLightningEnabled”:false,“isFilesSharingPrivacyEnabled”:true,“isFlexipageActionSchedulingEnabled”:true,“orgHasEinsteinInsightsEnabled”:false,“orgHasLightningLiveAgent”:false,“sfxRecordPreviewsOff”:false,“isFlexipageDeprecatedRendererEnabled”:false,“isRaptorRecordHomeFlexipageEnabled”:false,“isLWCFlexipageCustObjDsktpRH”:false,“isLwcFlexipageAllObjDskRH”:false,“isLwcFlexipageAllObjMblRH”:false,“useHotspotForAuraCmpsInLWCFLexipage”:true,“isExecuteHotSpotForLDS”:false,“isLDSRecordsDebug”:false,“useACTRecordLayoutForStandardObjects”:false,“useACTRecordLayoutForEdit”:false,“useACTRecordLayoutForCustomObjects”:false,“recordDataInvalidation”:false,“forceReloadRecordForInlineEdit”:false,“calendarAnythingAllowed”:true,“isMultiUserOrgEnabled”:true,“isEinsteinAssistantEnabled”:false,“isEinsteinAssistantPrefEnabled”:false,“isEinsteinBuilderEnabled”:false,“isEinsteinBuilderLicenseEnabled”:false,“isEinsteinBuilderPrefEnabled”:false,“isEinsteinBuilderStartedPrefEnabled”:false,“isEinsteinEverywhereEnabled”:false,“isAiEverywhereEnabled”:true,“isEinsteinMsaAcceptedEnabled”:false,“isEnhancedTemplatesEnabled”:false,“orgHasMatchedLeadsEnabled”:false,“isForceRefreshViewEnabled”:false,“useRaptorAlohaPage”:true,“isEngagementScoreVisible”:false,“isLeadScoreVisible”:false,“isLeadScoreSetupV3”:false,“useLexiCallbackReturnUrl”:true,“isTaskListViewsDisabled”:false,“isPopOutUtilitiesEnabled”:false,“useLightningReportBuilder”:false,“isReportEnhancedRunPageEnabled”:true,“useAntiPopcorn”:false,“recordChangeCapture”:false,“showTaskInfoPopover”:false,“isRaptorActionsContainerEnabled”:false,“isLwcFlexipageFullExpansionEnabled”:false,“isFormsEnabled”:false,“useQueryParamWhiteList”:false,“isChatterFeedOnlyInConsole”:false,“isCompactFeedInSfx”:false,“hasAutoTransitionPerm”:false,“hasOptedOutAutoTransition”:false,“hasFinishedAutoTransition”:false,“isScheduledSwitcherEnabled”:true,“isScheduledSwitcherFrequencyDaily”:false,“honorTargetInFormula”:false,“refreshOnInvalidSession”:false,“isNewRecordWrapperEnabled”:false,“isNewRecordWrapperEnabledStdApps”:false,“useDoubleIframe”:false,“isGlobalEventBusPilotEnabled”:false,“isLVMPinnedListOff”:false,“isTemplateEnhancedFolderPrefEnabled”:false,“orgCanAccessLtngTempFolder”:false,“isSCEFreemiumEnabled”:false,“isOpptyScoreEnabled”:false,“isOpptyScoreUserPermEnabled”:false,“hasAccessToCadenceWho”:false,“isLexEndUserNoSwitchingEnabled”:false},“isBlackBerry”:false,“isIE7”:false,“isFIREFOX”:false,“isIE6”:false,“isIE9”:false,“isIE8”:false,“isDesktop”:true,“isWindowsPhone”:false,“isTablet”:false,“isIPad”:false,“isOSX”:false,“isAndroid”:false,“isIPhone”:false,“isIOS”:false}},{“type”:“$ComponentLibrary”,“values”:{“isDSC”:false,“playgroundURL”:“https://d3nm9grey5nsoo.cloudfront.net”,“lockerServiceHostURL”:"https://tools-loc…}

Granting login access to a Sandbox where this is happening would be very helpful. I think that the second post from above was cut off, so there’s nothing really to go off of at this point.

Zach,

Do you think the issue could be as simple as needing to check the “Use Apex Proxy” checkbox in the Data Source Settings?  If so, how can I gain permissions to adjust that setting?  It is not editable from my user (I have Skuid Admin Permission Set).

No, the proxy checkbox should not be activated, this property is intentionally and appropriately disabled for the “salesforce” Data Source, we handle interactions with this “Current Salesforce Org” Data Source specially.