• Arvind1
  • NEWBIE
  • 105 Points
  • Member since 2008

  • Chatter
    Feed
  • 4
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 58
    Questions
  • 31
    Replies

Hi,

 

I created a salesforce instance 2 yrs back with an email id. Later I changed that email id and verified the same.

 

But now when I am trying to raise a case with salesforce using help and training, the Contact email address is being shown as my old email id which is no longer valid. I am not able to find out where should I change this email address

 

What is the procedure to change the Contact Email address which appears when raising a case with Salesforce?

 

Thanks
Arvind

Hi ,

 

As I am new to Apex Triggers..

 

Please guide me ,

 

I am using account object and accountsetup object.

 

 Account object is the master and the account setup object is the child.

 

I have a custom field in both objects.

 

If the custom field in the account setup object  is created/updated/deleted , the custom field in the account object  should be updated with the same value.

 

Any ideas!!!

 

 

regards

Ramesh

 

 

 

 

 

 

 

Hi,

 

I have created a VF page and added it into a section for a particular page layout.

But its visible only while viewing the record and is not there when adding new record or editing an existing one.

 

Any suggestions?

 

-Hims

Hi All,

 

I have two objects Event__C and Registrant__C .on Registrant object we hav a lookup field event link pointing to event object .

 

Now i have created a VF page on event object which i am displaying on site.

in this page the first part shows details of events using output field and the second part shows registrant object fields so that a site user can register for the event .But i am not able to do it properly .Please help me .

 

Getting error "

 

Error: Invalid field Registrant__r for SObject Event__c

"

Heres the code

 

<apex:page standardController="event__c" sidebar="false" showHeader="false" extensions="Registerbutton">

<table width="90%" align="center">
<tr>
<td>
<apex:form >
<apex:pageBlock title="Welcome For Registration" >

<apex:pageBlockSection title="Event Details">

<apex:Outputfield value="{!Event__c.Name}"  />
</apex:pageBlockSection>


<apex:pageBlockSection title="Guest Information" columns="2">
<apex:inputField value="{!Event__c.Registrant__r.First_Name__c}" />
<apex:inputField value="{!Event__c.Registrant__r.Last_Name__c}" />
<apex:inputField value="{!Event__c.Registrant__r.Company__c}" />
<apex:inputField value="{!Event__c.Registrant__r.Email__c}" />
<apex:inputField value="{!Event__c.Registrant__r.Phone__c}" />
<apex:inputField value="{!Event__c.Registrant__r.Address__c}" />
</apex:pageBlockSection>



<apex:pageBlockButtons location="bottom" >
<apex:commandButton action="{!Register}" value="Register " />
</apex:pageBlockButtons>
</apex:pageBlock>
<apex:image value="{!$Resource.elephant1}" width="100%" height="50%" />
</apex:form>
</td>
</tr>
</table>

</apex:page>

How to truncate the timestamp from the date object so that the return type is again a valid date which has to be passed to a query to get the result from database.Since in database it is stored without timestamp.

Hi.

 

Created a Custom Object A.

The Custom Object A  having text fields and also look-up fields.

 

Then created a VF called testpage.

 

I need to use the Custom Object  A's Page-layout in testpage.

To say simply  I don't need to again re-create the all text fields in the testpage.

I need to insert records to the custom object A using the testpage.

 

Really appreciate for your great ideas.

 

cheers

suresh

 

I have the following code and want to get the VF page to have the same color as the opportunity page that I drop it on to.  This way when when the page is not rendered (no partner record found) then the VF page has the same color as the Opportunity page and the user will not see anything their.  As the code works now, the VF is an off white color.

 

Since I added the style you cannot see the VF page outline when the text "Remember to enter partner records" is visible.  Why does it not work when the text his hidden. I need to get the page to be invisible or at least the same color as the Opportunity background color so it appears invisible.

 

<apex:page standardController="Opportunity" extensions="OppPartnerExtension">
    <style>
        #DIV_Container{padding: 0; margin: 0; background-color: #F3F3EC;}
    </style>
    <div id="DIV_Container">
        <apex:outputText style="Color:#FF3300; background-color:yellow; font-style:bold"                    
                       value="Remember to enter partner(s)"
                       rendered="{!NOT(hasPartners)}">
                       <!--
                       value="{!hasPartners}">
                       -->
                       
          <!-- This routine jumps us to the partner screen if a partner
               record does not exists      
               
          <script>
              parent.location.href = '/opp/partneredit.jsp?id={!Opportunity.Id}&fid={!Opportunity.AccountId}&retURL=%2F{!Opportunity.Id}';
          </script>
    
          -->  
        </apex:outputText>
    </div>
</apex:page>

 

 

 

Hello.

 

Our project-management application has a structure as follows: A Project_Template object has multiple Task_Template objects, which has multiple Dependency_Template objects, which has multiple Dependency_Filter objects.

 

I am currently building a class that walks through the project template and populates a new project based on the existing template(s).

 

I would have liked to select everything at once in a single SOQL query (like below) so that I can easily iterate through it.

 

 

this.projectTemplate = [SELECT Id, (SELECT Id, (SELECT Id, (SELECT Id FROM Dependency_Filters__r) FROM Dependency_Templates__r) FROM Task_Templates__r) FROM Project_Template__c WHERE Id = :ProjectTemplateId];

 

But of course, this is giving me the "SOQL statements cannot query aggregate relationships more than 1 level away from the root entity object." error.

 

So, my next thought was to write a wrapper class that queries each object as needed, that I could still iterate through. This task is proving more complex than I bargained for, and I am looking for an easier way to handle this entire process.

 

I can't imagine I'm the only one to have this issue. Is there anyone who could point me in the right direction, maybe some code samples?

 

Thanks in advance.

 

Hi all,

 

I have two custom objects questions and answers. Answers object has a lookup to questions object.

I am displaying a question name and the answers related to that question as radio buttons  in a row of a datatable.

 

I am using the following code for that

<apex:dataTable value="{!surveyListPage}" var="surveyqns" cellpadding="10">
              
              <apex:column rendered="{!ISNULL(surveyqns.question.Question_Name__c)}">
                   <apex:outputText value="{!surveyqns.question.Question_Number__c}"/>
                   &nbsp;&nbsp;&nbsp;&nbsp;
                  <apex:outputText value="{!surveyqns.question.Name}"/>
              </apex:column>
              <apex:column rendered="{!NOT(ISNULL(surveyqns.question.Question_Name__c))}">
                  <apex:outputText value="{!surveyqns.question.Question_Number__c}"/>
                   &nbsp;&nbsp;&nbsp;&nbsp;
                  <apex:outputText value="{!surveyqns.question.Question_Name__c}"/>
              </apex:column>    
              <apex:column breakBefore="true" rendered="{!surveyqns.question.Type__c == 'Radio'}">
                  <apex:selectRadio value="{!surveyqns.response.Response_Text__c}"
                  rendered="{!surveyqns.question.Type__c == 'Radio'}">
                            <apex:selectOptions value="{!surveyqns.ansop}"/>
                        </apex:selectRadio>
              </apex:column>
              <apex:column >
                  <apex:inputField value="{!surveyqns.response.Response_Number__c}" rendered="{!surveyqns.question.Type__c == 'Number'}"/>
              </apex:column>
          </apex:dataTable>

 

 

Here all the answer options are coming as radiobuttons in a single line. How do I display the answer options one below the other?

 

Any suggestion will be helpful

 

Thanks

Arvind

 

 

Hi All,

 

I have a requirement where the record should be saved 5 seconds after the click of a button.

 

I know that there is an actionpoller function in which I can give the time interval to perform the action.

But I am not getting the syntax how to use actionpoller with commandbutton.

 

Any suggestion on this will be of a great help.

 

Thanks

Arvind

Hi All,

 

I have a custom object called questions. There is an object called Answers which has a lookup to Questions object.

 

In a visualforce page datatable, I want to display the questions and next to that all the related answers of that question as radio buttons.

 

But I am not able to identify how do i relate the answers to the questions in my wrapper class. Here is the code I am using

public class SurveyController_new { Invitation__c inv; Invitation__c inv1; List<Question__c> questions = new List<Question__c>(); List<Answers__c> answers = new List<Answers__c>(); Set<id> questionids = new Set<id>(); Map<Id,Answers__c> ans1map = new Map<Id,Answers__c>(); Map<Id,List<Answers__c>> ansmap = new Map<Id,List<Answers__c>>(); Public List<wrpProduct> ProductPricewrp=new List<wrpProduct>(); public SurveyController_new(ApexPages.StandardController controller) { inv=(Invitation__c)controller.getRecord(); } List<String> anss = new List<String>(); public void questionsanswers(){ inv1=[select id,Survey__c from Invitation__c where id=:inv.id]; questions = [select Question_Description__c,Type__c from Question__c where Survey__c=:inv1.Survey__c]; for(Question__c qnids:questions) questionids.add(qnids.id); answers = [select Name,Question__c from Answers__c where Question__c in :questionids]; for(Answers__c anslist:answers) ans1map.put(anslist.Question__c,anslist); system.debug('map1'+ans1map); for(Question__c qnids1:questions){ List<Answers__c> anslist12 = new List<Answers__c>(); system.debug('list'+ans1map.get(qnids1.Id)); anslist12.add(ans1map.get(qnids1.Id)); ansmap.put(qnids1.id,anslist12); } for(Question__c qns:questions) ProductPricewrp.add(new wrpProduct(qns,ansmap.get(qns.Id))); } Public List<wrpProduct> getwrapperProducts(){ return ProductPricewrp; } Public class wrpProduct{ Public Response__c getprdtLine(){ return prdtln; } Response__c prdtln; List<Selectoption> ansoption = new List<Selectoption>(); public List<Selectoption> getansoption(){ return ansoption; } public Question__c questionobj{get;set;} public wrpProduct(Question__c qn,List<Answers__c> Answeroptions){ system.debug('options'+Answeroptions); this.questionobj=qn; prdtln=new Response__c(); for(Integer i=0;i<Answeroptions.size();i++) ansoption.add(new selectoption(Answeroptions[i].Name,Answeroptions[i].Name)); } } }

 When I use this code, I am getting only one answer option next to the question, since the key in map is unique. I can 

do this if I write the answer in the question for loop. Since it may hit the query limit, I want to avoid that. 

Any suggestion on this will be helpful.

 

Thanks

Arvind

 I am using

ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,'Please Enter atleast four Characters'));

 to display error message. The error message is getting displayed properly based on the condition. 

  But the following warning message is also getting dislayed some times.

The element type "td" should be terminated by the matching end-tag "</td>". at line 21

 

This is not required. How to avoid this warning message on the screen? 

Hi All,

 

In the Case object I have a field called Case Assignee. This is a field lookup to User. 

 

Following is my requirement:

 

I want to create a view with the criteria as Case Owner is the Current logged in user  and Case Assignee is not the current logged in user.

 

I am not able to identify how do I give this condition in the criteria.

 

Any suggestion on this will be helpful.

 

Thanks

Arvind

Hi All,
     I wish to associate a custom tab view to a visualforce page , is it possible if so kindly guide me with the  appropriate steps.


Thanks in Advance
Regards
Nalini

Message Edited by Nalini on 06-03-2009 12:18 AM
Message Edited by Nalini on 06-03-2009 03:50 AM
Message Edited by Nalini on 06-03-2009 03:52 AM

Newbie question, so thanks for any help

 

I have a custom object called Project_ka_c that holds a list of projects.  Related to this object is the Cases object, where you can have multiple cases for each project.

 

Im trying to develop a custom VF page that will list, for a given project, all the related cases.

 

Have the following VF page

 

<apex:page standardController="project_ka__c" showHeader="false"
    sidebar="false" extensions="CustomController">
    <apex:form>
        <apex:pageBlock>
            <apex:pageBlockSection title="Projects Cases">
                <apex:dataTable value="{!CustomController}" var="CC"
                    styleClass="list">
                    <apex:column value="{!CC.ID}" />
                    <apex:column headerValue="Subject">
                        <apex:inputField value="{!CC.Subject}" />
                    </apex:column>
                    <apex:column headerValue="Due Date">
                        <apex:inputField value="{!CC.Date_Du__c}" />
                    </apex:column>
                </apex:dataTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

And here is the customcontroler extension

 

public class CustomController{
  Project_KA__c myProject;
  List<Case> relatedCases;
private final ApexPages.StandardController controller;
  public CustomController(ApexPages.StandardController controller){
     this.controller = controller;
     myProject= (Project_KA__c)controller.getRecord();
relatedCases = [select Id, Subject,Date_Du__c from Case where Project__c = :myProject.Id];
   }
}

 

 

I am receiving the following error on the VF page(shown in red above) and am not sure why/how to resolve.

 

Save error: Unknown property 'Project_KA__cStandardController.CustomController'

 

Any assistance would be appreciated.

 

 

 

I have an application with a transaction record that has a lookup field to an employee object.  The name field in the employee object is the employee id.  We'd like to create our own lookup search page that allows the user to enter the employee name instead of the id.  This is similar to the filter functionality only it would be the initial search.  We know how to customize the lookup page but we would like to add a button, similar to the lookup icon, to the edit page to invoke our custom code.  Unlike display pages, it does not appear that you can embed a piece of Visualforce code on an edit page.  Do we really have to recreate the entire edit page in Visualforce or are we missing something?
I am using Account fields Billing Address and Shipping Address.
I have a requirement where I have to provide a checkbox on checking which the Billing Address values should be populated to Shipping Address values and on unchecking
it the original shipping address should be populated.
I am using the following code for this purpose.
Code:
Boolean SA;
public Boolean getBooleanCheck(){return SA;}
public void setBooleanCheck(Boolean b) {SA=b;}
String billingcity,billingstate,billingcountry,billingcode;
 public void setbillcity(String s){billingcity=s;}
public string getbillcity()
{
billingcity=SPP_Account_Renewal.BillingCity;
return billingcity;
}
public void setbillstate(String a){billingstate=a;}

public string getbillstate()
{
billingstate=SPP_Account_Renewal.BillingState;
return billingstate;
}
public void setbillcountry(String b)
{
billingcountry=b;
}
public string getbillcountry(){
billingcountry=SPP_Account_Renewal.BillingCountry;
return billingcountry;
}
public void setbillcode(string c)
{
billingcode=c;
}
public string getbillcode(){

billingcode=SPP_Account_Renewal.BillingPostalCode;
return billingcode;
}
String shippingcity,shippingstate,shippingcountry,shippingcode;

public void setshipcode(string c)
{
shippingcode=c;
}
public string getshipcode()
{

if((shippingcode==NULL)||(SA==FALSE))
    shippingcode=SPP_Account_Renewal.ShippingPostalCode;
      
else if(SA==TRUE)
shippingcode=billingcode;

    return shippingcode;

}

public void setshipcity(string e)
{
shippingcity=e;
}
public string getshipcity(){
if((shippingcity==NULL)||(SA==FALSE))
shippingcity=SPP_Account_Renewal.ShippingCity;
else if(SA==TRUE)
shippingcity=billingcity;

return shippingcity;
}
public void setshipcountry(string f)
{
shippingcountry=f;
}
public string getshipcountry(){
if((shippingcountry==NULL)||(SA==FALSE))
shippingcountry=SPP_Account_Renewal.ShippingCountry;
else if(SA==TRUE)
shippingcountry=billingcountry;


return shippingcountry;
}
public void setshipstate(string g)
{
shippingstate=g;
}
public string getshipstate(){
if((shippingstate==NULL)||(SA==FALSE))
shippingstate=SPP_Account_Renewal.ShippingState;
else if(SA==TRUE)
shippingstate=billingstate;

return shippingstate;
}


 
I am using the following in page editor.
Code:
<apex:inputCheckbox selected="false" id="shipping"/>
          <apex:actionSupport event="onclick" rerender="detail">
            </apex:actionSupport>


            <apex:pageblock >

            <apex:outputLabel value="Same as Billing Address"/><br></br>
            <apex:outputPanel>
            <b>Billing City</b><apex:inputText value="{!billcity}" ></apex:inputText>
            <b>Billing State/Province</b><apex:inputText value="{!billstate}"></apex:inputText>
            <b>Billing Country</b><apex:inputText value="{!billcountry}"></apex:inputText>
            <b>Billing Zip/Postal Code</b><apex:inputText value="{!billcode}"></apex:inputText>
            </apex:outputPanel>
       <apex:outputPanel id="detail">
       <b>Shipping Zip/Postal Code</b><apex:inputText id="shipc" value="{!shipcode}"></apex:inputText><br></br>
       <b>Shipping City</b><apex:inputText value="{!shipcity}"></apex:inputText><br></br>
       <b>Shipping State/Province</b><apex:inputText value="{!shipstate}"></apex:inputText><br></br>
       <b>Shipping Country</b><apex:inputText value="{!shipcountry}"/>
        </apex:outputPanel>
       </apex:pageblock> 

 
I have a similar code which is working in my developer edition.
 
Code:
Boolean cb;
public void setBooleanCheck(Boolean b)
{
cb=b;
}
public boolean getBooleanCheck()
{
return cb;
}
public void setzipc(String s)
{
z=s;
}
public string getzipc()
{
return z;
}
public void setzipcode(String s)
{
zc=s;
}
public string getzipcode()
{
return zc;
}
public void setcity(String s)
{
c=s;
}
public string getcity()
{
if((c==Null)||(cb==False))
c='Raj';
else if(cb==True)
c=z;


return c;
}
String co,st,ts;
public void setsts(String s)
{
co=s;
}
public string getsts()
{
if((co==Null)||(cb==False))
co='Shekar';
else if(cb==True)
co=zc;

return co;
}

 
And this is the Page Editor code.
Code:
<apex:inputCheckbox selected="{!BooleanCheck}" id="theCheckbox"/>
<apex:actionSupport event="onclick" rerender="detail">
</apex:actionSupport>

<apex:pageBlock >
<apex:outputPanel >
<apex:inputText id="zip" value="{!zipc}">
</apex:inputText>
<apex:inputText id="zipcode" value="{!zipcode}">
</apex:inputText>


</apex:outputPanel>
<br></br>
<br></br>
<br></br>


<apex:outputPanel id="detail">
<apex:inputText id="cit" value="{!city}">
</apex:inputText>
<apex:inputText id="ts" value="{!sts}">
</apex:inputText>

</apex:outputPanel>
</apex:pageBlock>

 But i have one more problem in the developer edition code. Since i have placed the textbox in outputpanel, i am not able to edit those textboxes directly.
But in y pilot edition i have to give the shipping address as editable.
 
Any suggestion on this will be of a great help.
 
Thanks
Arvind