• Maddy6161
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 12
    Questions
  • 8
    Replies
City Field             Country Field

Pune                    India

Formula Filed : PUNIN            like this
I have to Custom Object: ObjectA__c, and ObjecB__c, ObjectB__c related list of ObjectA__c, 
I have data in ObjectA__c now want to add new entery inside the ObjectB__c related list by the use VF page. How can i do that
public with sharing class contrllrww {

    Public id Current_le_Id;
    public Boolean isEdit { set; get;}
    public List<Question__c> lstQuestion {set;get;}
    public contrllrww (ApexPages.StandardController controller) {
        Current_le_Id = controller.getRecord().id;
        isEdit = false;
        lstQuestion = New List<Question__c>(); 
        for(Lead le:[select id,name,(select id,Email__c from Questions__r) from lead where id=:Current_le_Id]){
           for(Question__c con:le.Question__c)
               lstQuestion.add(con); 
        }
    }
    public void editProcess(){
        isEdit = true;
    }
    public  void save(){
        
        if(lstQuestion.size() > 0){
            upsert lstQuestion;
            lstQuestion.clear();
        }
        
        for(Lead le:[select id,name,(select id,Email__c from Questions__r) from lead where id=:Current_le_Id]){
           for(Question__c con:le.Question__c)
               lstQuestion.add(con); 
        }
        isEdit = false;
    } 
    public void addQuestion(){
        lstQuestion.add(new Question(leadId = Current_le_Id));
        isEdit = true;
    }
}
i am using https://c.ap2.visual.force.com/apex/standardpage?id=a0X28000000y4J8 to retrive these field

Object_A i have related object is Object_B
Now want to update the related Object_B fields.
feedformbyemail-developer-edition.ap2.force.com/pagefed?id=00Q2800000Hf2wV

i want to use id to get the details is there any way
I have created a button on standard layout on Conatct Object,name as "SEND MAIL" button when I pressed it will be sending a mail to the given mail ID. Now i want when he open the link he will get a VF form, with the help of VF form he will update his contact fields.

like
Name: Maddy                              Email :Maddy@gmail.com              these two field i have in Contact object, now i want update few field on                                                                                                                         Maddy Conatact such City,Countries 
City                       :   
Countries             :   
Mailing Address  :                         these field i want update from vf page which i have send on mail to the user




 
I have created a button on standard layout on Conatct Object,name as "SEND MAIL" button when I pressed it will be sending a mail to the given mail ID. Now i want when he open the link he will get a VF form, with the help of VF form he will update his contact fields.

 
Account : Maddy  - drop-down filed when i selected Maddy i want to retrive Fax, Phone, Website fields will be showned automatically

Fax:  ______________  these field automatically come when i select account name from dropdown
Phone:_____________
Wesite:_____________

 
i have created a survay__c object, where i have create some data field like name email address. 
i have few data aready on that object. Now i have create a button when i click on the it will be send a mail on given mail id.
like
name                             email address
abc                                abc@gmail.com
xyz                                 xyz@gmail.com

Now i have created one more section on survay__c object where i create check list 
like: [] Are u happay?  [] Are u Work with us?  

i have created some questions on that section.

 On the mail i am sending a link which content VF form page for updataing Question section. Onec the user selected the options then submited it will updated on survay__c object on Question section .

 
City Field             Country Field

Pune                    India

Formula Filed : PUNIN            like this
Without using Sites Force.com
User-added image

With Sites Force.com
User-added image
<!--Page-->
<apex:page standardController="Lead" extensions="contollertest">
  <apex:form >
    <apex:pageblock id="pgb">
    <apex:pageBlockButtons >
        <apex:commandButton value="edit" action="{!editProcess}" rendered="{!Not(isEdit)}" reRender="pgb"/>
        <apex:commandButton value="save" action="{!save}" rendered="{!isEdit}" reRender="pgb"/>        
    </apex:pageBlockButtons>
       <!-- Display Account related Contacts -->
       <apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!Not(isEdit)}">
       <apex:commandButton value="save" action="{!save}"/>
         <apex:column value="{!val.Que1__c}"/>
         <apex:column value="{!val.Que2__c}"/>
         <apex:column value="{!val.Que3__c}"/>
       </apex:pageBlockTable> 
        <apex:outputPanel rendered="{!Not(isEdit)}">
           <apex:commandButton action="{!addQuestion}" value="Question" reRender="pgb"/>
       </apex:outputPanel>
        <apex:pageBlockTable value="{!lstQuestion}" var="val" rendered="{!(isEdit)}">
         <apex:column headerValue="Q.What is budget?">
             <apex:inputField value="{!val.Que1__c}"/>
         </apex:column>
          <apex:column headerValue="Q.When do you want?">
             <apex:inputField value="{!val.Que2__c}"/>
         </apex:column>
         <apex:column headerValue="Q.Would like Video?">
             <apex:inputField value="{!val.Que3__c}"/>
         </apex:column>
       </apex:pageBlockTable> 
    </apex:pageblock>
  </apex:form>
</apex:page>
 
Account : Maddy  - drop-down filed when i selected Maddy i want to retrive Fax, Phone, Website fields will be showned automatically

Fax:  ______________  these field automatically come when i select account name from dropdown
Phone:_____________
Wesite:_____________