You need to sign in to do that
Don't have an account?
max alexander
Visualforce create child object from visual force search page
HI,
Ihave following VF page
Person__c where it will have only first name, last name and Email address how can i do this?
my controller is
how is it possible, also
is there a way to display on that page most recent Person Added to that account?
any code would be greatly appreciated
Ihave following VF page
<apex:page standardController="account" extensions="searchform"> <apex:form > <apex:inputText value="{!searchstring}" label="Input"/> <apex:commandButton value="Search records" action="{!search}"/> <apex:commandButton value="Clear records" action="{!search}"/> <apex:pageBlock title="Search Result"> <apex:pageblockTable value="{!acc}" var="a"> <apex:column > <apex:outputlink value="https://cochlear--guest1.cs8.my.salesforce.com/{!a.id}">{!a.Name}</apex:outputlink> </apex:column> <apex:column value="{!a.personEmail}"/> <apex:column value="{!a.phone}"/> <apex:column value="{!a.personMobilephone}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>basically it does searches when i open the page, however what i like to include is another button on it that when clicked will let me create custom object
Person__c where it will have only first name, last name and Email address how can i do this?
my controller is
public with sharing class searchform { public list <account> acc {get;set;} public list <Install_Base__c> ib {get;set;} public string searchstring {get;set;} public searchform(ApexPages.StandardController controller) { } public void search(){ string searchquery='select name,phone,personEmail,PersonMobilePhone,Latest_Fitting_Date__c from account where name like \'%'+searchstring+'%\' Limit 20'; acc= Database.query(searchquery); } public void clear(){ acc.clear(); } }
how is it possible, also
is there a way to display on that page most recent Person Added to that account?
any code would be greatly appreciated
basicaly i need a VF button whne searhc displayed next to each of hte displayed accounts that when clicked will create new Person__c records asking for name and email adress before creating it.
Let's start with the controller:
Apex Code:
Visualforce Page:
I think the code is self explainatory, if you need any more help, you might ask
Regards,
-Saket