New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce DEX-450 Exam - Topic 9 Question 16 Discussion

Actual exam question for Salesforce's DEX-450 exam
Question #: 16
Topic #: 9
[All DEX-450 Questions]

A developer created a Visualforce page and custom controller to display the account type field as shown below. Custom controller code: public class customCtrlr{ private Account theAccount; public String actType; public customCtrlr() { theAccount = [SELECT Id, Type FROM Account WHERE Id = :apexPages.currentPage().getParameters().get('id')]; actType = theAccount.Type; } } Visualforce page snippet: The Account Type is {!actType} The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is property referenced on the Visualforce page, what should the developer do to correct the problem?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Laurene
4 months ago
Converting to String doesn't make sense here, that's not the issue.
upvoted 0 times
...
Theodora
4 months ago
Surprised this isn't working already, seems like a simple fix!
upvoted 0 times
...
Mila
4 months ago
I thought changing theAccount to public would work too.
upvoted 0 times
...
Ettie
4 months ago
Totally agree, that's the way to fix it!
upvoted 0 times
...
Martha
4 months ago
A needs a getter method for actType.
upvoted 0 times
...
Annette
5 months ago
Adding with sharing (option D) could affect data visibility, but I don't think it would solve the display issue directly. I might lean towards option A.
upvoted 0 times
...
In
5 months ago
I feel like converting theAccount.Type to a String (option C) isn't necessary since it's already a String type. That seems off to me.
upvoted 0 times
...
Ryann
5 months ago
I'm not entirely sure, but I think making theAccount public (option B) might expose it, which isn't always a good practice.
upvoted 0 times
...
Marquetta
5 months ago
I remember we discussed that if a variable is not being displayed, it might be due to not having a proper getter method. So, option A sounds plausible.
upvoted 0 times
...
Rosalind
5 months ago
I'm a bit confused on this one. Is it B - Supply Chain Management (SCM)? Or is that a different module? I'll have to double-check my understanding.
upvoted 0 times
...
Herminia
5 months ago
Okay, let's see. The interviewing method is typically used when you need to gather requirements directly from stakeholders, especially when there are communication challenges or time constraints. I think option C is the best fit here.
upvoted 0 times
...

Save Cancel