Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How-To Reference a dependent Reference? #11

Open
softwareangel opened this issue May 14, 2019 · 3 comments
Open

How-To Reference a dependent Reference? #11

softwareangel opened this issue May 14, 2019 · 3 comments

Comments

@softwareangel
Copy link

softwareangel commented May 14, 2019

Greetings,

I am struggling with creating an simple interface that has 70 Institutions (Account lookups) that references over 250 Programs. I did not use the Intended Programs listing since it would be too much for users to scroll a list of 250+ programs; therefore, filtering by an Institution would separate the Program listing significantly.

  1. My first attempt had 2 reference questions with the following queries:

Question1. SELECT Name FROM Account WHERE RecordType = 'Institution'
Question2. SELECT FROM Program WHERE Department_Name__c = (SELECT TextValue__c FROM QuestionResponse where Question = Question1.ID)

Of course that did not work, since I could not generate a query that would get the value of the previous question's response on the same page.

  1. On my second attempt, I tried a brute-force approach by creating 70 Picklist holding the queries of each Institution:

SELECT Name FROM Program WHERE Department_Name__c = 'My College Name"

This approach worked for the first 25 widgets/controls, but since there is a 25 widget/control limitation on Visualforce pages, add more generated a failure. Also, I realized the increased storage used, since 70 possible questions for each submitted application was saved with the 1 question response/answer.

  1. Lastly, I tried to store the results in the Application object with hopes of referencing it later:

Question1. SELECT Name FROM Account WHERE RecordType = 'Institution' (stored in Intended_Institution__c)
Question2. SELECT FROM Program WHERE Department_Name__c = :application.Intended_Institution__c (stored in Intended_Program__c)

This approach failed with run-time error stating the variable did not exist. (I tried other variables that I found in the apex classes, which failed also included app, appControl, applicationID, etc.)

I need help. I do not know if Holding Place or URL Parameter usage will help, but I cannot find examples in the User Guide.

Thanks.

@kyleschmid
Copy link
Collaborator

@softwareangel Why not use one of the filtering picklists (i.e. School/College)? You could add picklist values for each institution and select the relevant institution on each program. You might need to make a small modification to the area around line 250 in the ApplicationCreate class. By default, EASY doesn't restrict the program list when users pick values and instead displays an error message when they try to create the application with an invalid program. The reason for this is a business one: a common complaint by admissions staff is that users call the office when they can't find the program they want after it's filtered out of the list. There's nothing stopping you from changing this behavior, however.

@softwareangel
Copy link
Author

softwareangel commented May 14, 2019 via email

@softwareangel
Copy link
Author

softwareangel commented Jun 10, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants