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
Srinivas AnnamSrinivas Annam 

visual force creation with related list

I want to develope vf page related to sobject account with one text field(name) and one submit button.
whenever we enter a name and click that submit button,then duplicate name related total account records will display with child object contact records(eg:Acconut-->contact) but child records inside those parent records only(Ex:srinivas having 10 contacts if you submit srinivas name that display srinivas name with 10 contacts in one record only).
    
Ajay Ghuge 6Ajay Ghuge 6
Hi Srinivas ,

1. Query on Account with Name from a page.
2. If the query is resulting in records 
    i) Query on Contact with criteria Account.Name = 'Your string from page'
   ii) Bind the returning list to page
3.If query is not returning any record then 
  i) Create the Account record first
 ii) Perform the next operation you want as it is not mentioned in the description.

Let me know if you require any other information in this.

Regards,
Ajay