Timeline for Passing user entered values from Visualforce template to Apex Controller
Current License: CC BY-SA 3.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 10, 2018 at 19:49 | vote | accept | Rory | ||
Jan 10, 2018 at 19:49 | comment | added | Rory | Yes! It is working now without errors. There is more I need to do for this but you have helped me answer this question. Thank you so much for your help! | |
Jan 10, 2018 at 14:52 | comment | added | gNerb | @John I think I found where there error could be coming from and fixed the code. That being said, this is the last time I'm going to update the code. Please accept this answer as it does address your original question. If you run into any other issues, post them on a new question. | |
Jan 10, 2018 at 14:50 | history | edited | gNerb | CC BY-SA 3.0 |
added 164 characters in body
|
Jan 10, 2018 at 14:48 | comment | added | gNerb | Yes, what you did was correct. To debug it, try adding your component to a visualforce page and previewing it via the debug console. That should give you the logs to figure out where the error is. | |
Jan 10, 2018 at 2:32 | comment | added | Rory | Thanks for the help. A small change I had to make was on the 2nd line of the controller. The component said it did not have write access to "accountID' so I changed the code to public ID accountID{get;set;}. I am not sure if this is correct but it got rid of that error message. I am getting a different error message now when I try to run the email template with values. "Error occurred trying to load the template for preview: Attempt to de-reference a null object. Please try editing your markup to correct the problem." It doesnt point me to the line though. Any pointers for debugging this? | |
Jan 9, 2018 at 16:14 | comment | added | gNerb | @John Updated my answer to get it more inline with how you said the relationships work. Hopefully that gets you the last little bit. | |
Jan 9, 2018 at 16:13 | history | edited | gNerb | CC BY-SA 3.0 |
added 546 characters in body
|
Jan 9, 2018 at 16:08 | comment | added | gNerb | I'm sorry, I completely misunderstood your previous comment about how the add-ons are related. Ill try to update the answer again. | |
Jan 8, 2018 at 22:21 | comment | added | Rory | Thanks for getting back to me. I have made a few changes to my code with no luck still. I have edited the main post with updated code. For some reason, when I query for 'Add_ons__c' it returns the "System__c' object. I feel like I am getting close. The email template is getting an error when I test it out which is actually making me optimistic. | |
Jan 8, 2018 at 15:37 | comment | added | gNerb | Updated my answer. I'd like to add that the vast majority of developers/admins I have met have grown to hate mutli-select pick-lists. They are a nightmare to work with, terrible for reporting and cause issues when trying to integrate them with systems out side ofSalesforce. I'd recommend switching to checkboxes (if you have only a few add-ons) or a custom object if you have many. | |
Jan 8, 2018 at 15:37 | history | edited | gNerb | CC BY-SA 3.0 |
deleted 133 characters in body
|
Jan 5, 2018 at 22:57 | comment | added | Rory | This seems to be the path I want to go down. It is not letting me create a list of type 'Add_ons__c' though. I think this is because 'Add_ons__c' is a multi picklist field of 'System__c' and 'System__c' objects are added under an 'Account' with by a lookup relationship. Should I just make the return a String instead of a list? I can make the query at the end look like: [ SELECT Add_ons__c FROM System__c WHERE Account__r.ID = :accountId ] | |
Jan 5, 2018 at 22:22 | history | edited | gNerb | CC BY-SA 3.0 |
added 976 characters in body
|
Jan 5, 2018 at 22:16 | history | edited | gNerb | CC BY-SA 3.0 |
added 976 characters in body
|
Jan 5, 2018 at 22:05 | history | edited | gNerb | CC BY-SA 3.0 |
added 126 characters in body
|
Jan 5, 2018 at 22:00 | history | answered | gNerb | CC BY-SA 3.0 |