• Santosh Joshi 11
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 7
    Replies
I've create a survey on a FormAssembly form and a coresponding object in Salesforce that capture the respondants contact information and response to survey questions. What I'm trying to do is assign a numeric grade to each answer, ex. Excellent = 100, Very Good = 80 etc. I'd like to have the scores to parse through Tableau for satistical analysis. Any help with a solution would be greatly appreciate. Best, Glenn
Hi all,
I have a need to setup a structure in apex where I can specify for a Contact object and a specific set of record types, a set of fields have xyz custom roles. 

For example: I want to define a structure that says:
  1. For a Contact object, the field TestField__c, the following record types:  RecType1, RecType2, and RecType3 are assigned the custom roles "CustomRole1, CustomRole2, CustomRole3"
  2. For a Contact object, the field TestField2__c, the following record types: RecType1, RecType2, and RecType3 are assigned the custom roles "CustomRole4, CustomRole5"
This is something that I need to build out as a some type of static final map in an apex class but need help on how to structure such a map.  I am not able to use a custom metadata due to some circumstances beyond my control.  Any help with this would be greatly appreciated.

I took a stab at it but I don't think this will give me what i want:
 
public static final map<string, map<string, map<string, List<string>>>> myMap = new map<string, map<string, map<string, List<string>>>>  {
'Contact' => new map<string, map<string, list<string>>> {
'TestField__c' => new map<string, list<string>> {
'RecType1-RecType2-RecType3' => new List<String> {
'CustomRole1',
'CustomRole2',
'CustomRole3
}
My thinking is here is that when I am parsing for the RecordTypes, I can maybe strip out the dashes.



 
  • April 11, 2023
  • Like
  • 1
I need to retrieve the objects from an org only iff they have a field set associated to them.  I know how to retrieve the sObjects from the org but is there a way to only retrieve the sObjects that have at least 1 field set associated to them?

Thnak you,
Michael
  • April 07, 2023
  • Like
  • 1
I have an object called Invoice, which has account, order, and opportunity as lookup fields. I have overridden the Inoice New button, on new invoice record creation, when I select Account, respective order and opportunity records want to show in the lookup fields to select.
Currently, I am using 
 <lightning-input-field field-name="Order__c" onchange={handleOrderSelection}></lightning-input-field>
where it displays record records

Thanks in Advance !!

I’m trying to connect my staging server to the Salesforce sandbox via OAuth. The exact same code (written by my predecessor) is running on the production server connecting to Salesforce production. Both servers are clones of each other, the only difference is the OAuth credentials. I’m running the code to retrieve a token, but getting an error:

[error] => invalid_grant [error_description] => expired authorization code

Request for auth:
https://test.salesforce.com/services/oauth2/authorize?scope=full&state=fdf0…067e&response_type=code&approval_prompt=auto&redirect_uri=https%3A%2F%2FDOMAIN%2Foauth%2Fsalesforce&client_id=3MVG…kR8m

After authentication/authorization, Salesforce redirects back to my staging site:

https://DOMAIN/oauth/salesforce/?code=aPrx…IA%3D%3D&state=fdf0…067e

Here we successfully verify the state, then submit the authorization code to get the token.

Request for token:

https://test.salesforce.com/services/oauth2/token?client_id=3MVG…kR8m&client_secret=D59D…A0D7&redirect_uri=https%3A%2F%2FDOMAIN%2Foauth%2Fsalesforce&grant_type=authorization_code&code=aPrx…IA%3D%3D

Response:

( [error] => invalid_grant [error_description] => expired authorization code )

I’ve compared the sandbox Connect App’s settings to its counterpart in production countless times, the token is not set to immediately expire. Salesforce support also confirmed that my settings are the same. I also relaxed IP restrictions.

The authorization URL request works appropriately, so my ID/secret appear to be valid, although I’ve double checked them. I even created a new connected app which produced the same results.

Thanks!

Running a suite of Automated Test jobs, we have started getting the Salesforce message 'Check your internet connection and try again' at apparently random stages.
 
There's no evidence on our server that there's a problem with the internet connectivity and we don't get the error when going into Salesforce front end and reproducing what the Auto Test is doing. We have tried running the tests on a different Salesforce Org/Instance, but the problem is the same.
 
Although it's not impossible that the internet connection could be dropping out intermittently, I'm wondering if it is an accurate message or if the root cause is something else. Has anyone seen this message and if so what can be done to resolve it?
 
I need to retrieve the objects from an org only iff they have a field set associated to them.  I know how to retrieve the sObjects from the org but is there a way to only retrieve the sObjects that have at least 1 field set associated to them?

Thnak you,
Michael
  • April 07, 2023
  • Like
  • 1