RESOLUTION: In this case, using a profile-specific Page Assignment was more appropriate than of a Record-type specific Page Assignment.
Affects: Skuid on SFDC
A client set up a Skuid Page Assignment to redirect users to different places in Salesforce when creating a new record, depending on the new record’s record type. However, the redirect only worked when “Any Record Type” was selected in the Page Assignments. If a particular record type was selected, then the redirect would fail.
On the Salesforce side, I first verified that the overridden “new record” action was using the correct Visualforce redirect markup by using the Skuid Documentation on deploying in Visualforce
- I also verified that the object's "New" action was overridden with Visualforce redirect page.
- I also reviewed everything in the page that had to do with record types, to look for anything else that might be related to the problem, since record types seemed to be important in the initial problem statement. Another (faster) test I could have run would have just been to set up the Page Assignment to point to a blank Skuid page, to see if that page causes the redirect to behave differently. Ultimately though, I wasn’t able to find anything in the Skuid page itself that seemed relevant to the issue.
I then reviewed all of the Skuid page assignments that had to do with the object’s “New” action, to understand the redirect scenarios Skuid should
- be handling. Was there perhaps a scenario that wasn’t being covered by a page assignment? If so, we should ensure that there's a default catch-all assignment set up as a fall-back.
- With all the above findings in hand, I checked in with the client to make sure I understood the intended behavior correctly, and compared it to what I saw in all the above settings.
- Finally, since there’s a lot of complexity inherent to record types themselves, I reviewed the relevant settings in relation to the page assignments.
- In the Salesforce setup menu, I looked at the User profile > Object settings > [object] > Record Type setup.
- I found that the target user profile only had access to one record type on the object.
- The client confirmed that this was the intended setup, so I tested out the default Salesforce behavior for creating new records on this object.
- I noticed that these target users never saw a prompt from Salesforce to choose the new record’s record type (whereas normally, users do get prompted to choose a record type first).
- I also saw that when the new record was being created, the record type id was missing from the URL parameters. When I manually added it to the URL as a test, I saw that Skuid tried to use whatever record type I added.
In this case, for the target users (who can only use one record type), we ultimately used a profile-specific page assignment instead of a record-type specific page assignment. This fit the use-case better, and provided the desired behavior.
The problem was happening because the specific profile only had access to one record type on the object - the one that should send the user to the Skuid page. Since the users only had one record type accessible, Salesforce was not even including the intended record type’s ID# in the URL parameters when these users clicked the “New” button. That meant the Skuid redirect, which had been set up correctly, couldn’t account for the selected record type because it couldn’t see any record type id in the URL parameters.
For a page assignment to target specific record types, users must have access to more than one record type on that object. If they don’t, the page assignment won’t work as expected. Thinking more basically, if the profile is only ever going to be creating one record type, the page assignment does not need to specify any record types. Understanding the overall goal and relevant environment settings was key to determining the best Skuid page assignment setup.
We could have uncovered the root cause sooner if we started by reviewing the use-case and desired behavior, and compared that against profile & Salesforce environment settings.
Get help with an issue
Ask in the Skuid user community in the
If you have paid support, ask your question on our support portal
- If you’re interested in support, contact your Account Executive.