You need to sign in to do that
Don't have an account?
Ritika Shouche
Adding custom Checkboxes in ApexPageblockTable Column
Hi,
I have three Objects to Deal with - User (Portal user), Contact and CustomObject.
CustomObject is Child of Contact.
Considering Three Checkbox fields on Custom Child Object I want to display Checkbox True or False in front of user record on VIualforce Page table.
With above information, I can display Name of User, Email and Phone using List "userinfolist ". Now I want to add A column with a checkbox, where if User's Contact record has CustomCHild Object record created and IF Active__c and Support__c field on that child record are True then Display true on userinfolist.
I have three Objects to Deal with - User (Portal user), Contact and CustomObject.
CustomObject is Child of Contact.
Considering Three Checkbox fields on Custom Child Object I want to display Checkbox True or False in front of user record on VIualforce Page table.
//This gives me Logged in users ID and ContactID on his user record userList = new List<User>(); User usr = [Select Id, contactId from User WHERE ID ='XXXyyyyyyyZZZZ' ]; //This gives me name of Account of Contact of Logged in User con = [Select id,Name,AccountId,Account.Name,Phone__c ,Email__c FROM Contact WHERE ID =: usr.ContactId]; //This gives me List of all Contacts for that Account also FIelds on Custom CHild Object of Contact which we need to use for Checkbox Display contactInfo = [Select id,Name, (SELECT ID ,Active__c,Support__c FROM CustomObject__r)from Contact WHERE AccountId =: con.accountId]; //This gives List of Users for those Contacts userinfolist = [Select Id,Name,ContactId,Contact.Name,Email,CompanyName,Phone from User Where IsActive = true AND Profile.Name =: Label.SupportUser AND ContactId IN: contactInfo]; }
With above information, I can display Name of User, Email and Phone using List "userinfolist ". Now I want to add A column with a checkbox, where if User's Contact record has CustomCHild Object record created and IF Active__c and Support__c field on that child record are True then Display true on userinfolist.
Thank You
Akshit
All Answers
Thank You
Akshit
If this answer is helps you please let me know
Thank You
Akshit