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
THUNDER CLOUDTHUNDER CLOUD 

How to display contacts detail in inputtext box format ?

I need to create a visualforce page to search for contact details of a person by name or bid number and I want to display the details of that person in inputtext box format instead of pageblockTable. If that contact doesnot exist then I should be able to save the details of the person through those inputtext boxes. How to automate this ?
Vasani ParthVasani Parth
Hi,

You can implement below similar case,
 
trigger SubscriptionEmail on Account (after update) {
 
                  for(Account acc: Trigger.new){
                           Account oldAcc = Trigger.oldMap.get(acc.Id);
                            if(oldAcc.Subscribed__c != acc.Subscribed__c && acc.Subscribed__c == true)
                                 { 
                                         List<Contact> children = [ SELECT Id, AccountId, Customer__c from 
                                         Contact where AccountId = :acc.Id];
                                        List<Contact> newids = new List<Contact>();
 
                                        for(Contact con: children){
                                                if(con.Customer__c != acc.Subscribed__c){
                                                        con.Customer__c = acc.Subscribed__c;
                                                newids.add(con);
                                                }
                                        }
                                        if (newids.isEmpty()== false){
                                                update newids;
                                       }
                                }
                 }
  }

Please mark this as the best answer if this helps
 
THUNDER CLOUDTHUNDER CLOUD
Hi Vasani,

You didn't get my question. I want to design visualforce page.
VineetKumarVineetKumar
Can you share the VF Page and Controller code here?