function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DoondiDoondi 

why am not getting values in my vf page?

Hi, I am trying to build a related list , 
Units has Master relation to praperty

below is my class and page: But I am not getting values in my page.
Thanks in advance.
 
public class DeleteFlag
{
    public Property__c prop{get; set;}
    Public Unit__c unts{get;set;}
    public List<Unit__c> Records {get; set;}
    public DeleteFlag(ApexPages.StandardController controller)
        {
            prop=new Property__c();
            unts = new unit__c(); 
            
            Records = [select Name,Property_Unit__c FROM Unit__c WHERE 
            Property_Unit__c = :Prop.Name];
            system.debug(prop.Name);
            
            
        }

 
Best Answer chosen by Doondi
bhanu_prakashbhanu_prakash
Sure, Bhanusunny73

All Answers

bhanu_prakashbhanu_prakash
Hi Doondi,
Mark as best answer, If it resloves !!​
system.debug(prop.Name);
Check here you are getting values to statisfes Property_Unit__c = :Prop.Name .
you not getting values in System.debug 

try to add Name field for property 

Mark as resloved if it helps :) :)
Thanks, 
Bhanu Prakash
visit ForceLearn.com  (https://www.forcelearn.com/)
DoondiDoondi
Hey Bhanu,
Thanks for your reply, I used Id and worked it.
Your ForceLearn.com is impressive.
bhanu_prakashbhanu_prakash
Thanks for update, 
Thanks for visiting my blog.
If its resloved, Marked as sloved
DoondiDoondi
can I get your skype Id?
bhanu_prakashbhanu_prakash
Sure, Bhanusunny73
This was selected as the best answer