Salesforce Spoke Get record action for a custom Object in salesforce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi All,
I am attempting to setup a integration using the salesforce spoke that will look for records for a custom object in salesforce. We already have the spoke setup and Cases are coming over into ServiceNow. I have added the custom object name into the decision table for the salesforce integration and when sending something from Salesforce to ServiceNow a flow kicks off based on that decision table. In the flow there is an action "Get Record" that is in the salesforce application scope in ServiceNow. When this action is running it is querying the Case table instead of the custom object table in Salesforce to get the record details.
Does anyone know how I would get that action to query the custom object table in Salesforce?
pic provided of get record details action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
How to Fix:
You need to **clone** the “Get Record” Action into your application scope and expose a new input called `Object API Name` (for example: `my_custom__c`).
Steps:
1) Go to:
**Flow Designer → Action → Salesforce Spoke → Get Record**
2) Click **Create Version** (or **Copy Action**) into your scope.
3) Add a new input field:
- Name: `sObject`
- Label: `Salesforce Object`
- Example: `my_custom__c`
4) In the Script step inside the Action, replace the static “Case” reference:
Replace:
var objectName = ‘Case’; WITH var objectName = inputs.sObject;
5) Save and Publish the customized Action.
6) In your Flow:
Use **your cloned action**, not the original spoke action.
Pass `my_custom__c` (or whatever your object is named).
Important Notes:
• Salesforce Spoke OOTB only supports standard objects unless you override the action.
• Decision tables only select which flow runs; they **do NOT** change the object queried by the spoke.
• Your custom object must have API access and be added to the connected app scope in Salesforce.
If you want, I can write the exact code for the modified Action, or generate a ready-to-import update set.
Hello i hope that can help
If you find this answer useful, please mark it as solution accepted/helpful
Massimiliano Micali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Appreciate the reply Max. I will give this a shot. I was hoping due to the object name being a dynamic choice and us having added that object to the object name field it would pick up on that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hope that can usefully 🙂
