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

validation of record using vf,apex,and custome object and return the record.


i have two fields on vf page like username and password. when i enter the correct username and password it has to pull up the the total information from custome object, related to that user . otherwise its throws an error like invalid useename and password.




Create two text fields on VF page 

Once you enter data, Pass the information to controller and write query to get information of custom object  

if it matches , display custom object information,

if not matches use apex:pageMessage  to display error messages


Note: if you don't have knowledge in VF pages , Look below site

Chamil MadusankaChamil Madusanka

You can use my reply to one of your question. Link is


You need to change the object and name. You can use that procedure to fulfull you requirement here.


If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.