• Arvind1
  • NEWBIE
  • 105 Points
  • Member since 2008

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

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.

 

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

 

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.

 

 

 

Hi

 

I have a requirement to notify a user when there is an error while processing the batch job.

 

I have written a try catch block in start and execute methods. In the try block, I am inserting a list.

In catch block I tried inserting a record in a generic object named Exception, which has a workflow to send an email to a user.

 

When i tried this and checked in debug log, I see that the record is created in the Exception object which also gives an Id. But when I go that object and check its not available and when I put the Id which I got in debug log in the URL, its showing as "Data Not available".

 

I also tried sending mail through the apex email class, there also the same problem. Debug log shows that mail has been sent but I dont get the mail.

When I write the same in finish method, I am getting a mail.

Below is the code I am using:

global Database.QueryLocator start(Database.BatchableContext BC){
try{
    return Database.getQueryLocator(query);
}
catch(Exception e){
Exception__c objException = new Exception__c();
objException.Description__c = message;
objException.NotifyTo__c = 'abc@abc.com';//actual mail address here
objException.ExceptionSource__c = source;
objException.User__c = userInfo.getUserId();
objException.EmailSent__c = true;
insert objException;
String recipientAddress = 'abc@abc.com';
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String textbody = 'There has been an error while processing the job';
String textSubject = 'Job error';
String[] toAddresses = new String[] {recipientAddress};
mail.setOrgWideEmailAddressId('xxxxxxxxxxxxxxx');
mail.setToAddresses(toAddresses);
mail.setSubject(textSubject);        
mail.setPlainTextBody(textbody);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
}
}

 

I tried the above(inserting record and sending mail) one after the other and also together. But nothing worked

 

Please let me know any thoughts

 

Thanks

Arvind

Hi,

 

I have a number field on Case called "No_Case_owner_changes__c" which has a default value of 0.

 

When the Case is created, I have to set the value of the above field to 1 if the "Assign using active assignment rules" is unchecked.

 

But if the "Assign using active assignment rules" is not checked when the case is created, the value of the field should remain 0.

 

So, I wanted to know is there any way I can check if "Assign using active assignment rules" is checked or not in a Case trigger.

 

Any suggestion will be helpful

 

Thanks

Arvind

 

Hi All,

 

I have a pageblocksection inside <apex:repeat> tag. So it will be around 10-15 pageblocksections in the page with proper data.

 

My requirement is as follows:

I need to have a link at the top of the page namely Collapse All, clicking on which all the pageglocksections should collapse. Same requirement for expanding all sections.

 

I am able to achieve this for a single pageblocksection with the following code.

<apex:page tabstyle="Account" standardController="Account" extensions="ttttttttttt">

<script>
function PageBlockSectionCollapse(el){

if(typeof twistSection === 'function'){ 
var theTwist = document.getElementById(el);
if(theTwist){
twistSection(theTwist.childNodes[0].childNodes[0]);
}
}
}
</script>
<apex:form >
<apex:pageBlock >

<apex:pageblockSection columns="1" showHeader="true" title="Add CI Relationships" id="CIRel">
<script>PageBlockSectionCollapse('{!$Component.CIRel}');</script>
123
</apex:pageblockSection>

<apex:commandLink value="123" oncomplete="javascript&colon;PageBlockSectionCollapse('{!$Component.CIRel}');"/>
</apex:pageBlock>

</apex:form>
</apex:page>

 

But if I give the pageblocksection inside repeat tag, I am not able to access the id of pageblocksection using document.getElementbyId. I thought it would come as an array in the javascript function and all sections will be collapsed.

 

Any suggestions will be helpful.

 

Thanks

Arvind

 

Hi All,

 

I have some long text area fields in my VF page which is using Standard controller and extension.

I am using Standard save method in the action for Saving the record.

The long text area fields have character limit of 10000.

 

When I enter more than 10000 characters in the field and click Save, I am getting the following error message twice

 

"You can't use more than 10,000 characters"

I am not using pagemessage tag and there is no validation rule also.

This is happening in the sandbox instance which was recently refreshed with the new winter release 11.

 

Initially I thought there is some problem in the controller. So I tried to have only one field in the page with only Standardcontroller and no extension. Still it displays the error message twice.

Following is the code I am having in my VF page.

<apex:page standardController="Case" apiVersion="20">
<apex:form >
      <apex:pageBlock >
          <apex:pageBlockSection title="Problem Description Notes" id="pbs1" columns="1">
               <apex:inputField value="{!Case.Problem_Description__c}" style="width:300px"/>
          </apex:pageBlockSection>
      <apex:commandButton value="UpdateCase" action="{!Save}"/>
      </apex:pageBlock>
       
</apex:form>

</apex:page>

 

 

I am not getting what is the mistake here.

 

I tried the same thing in my developer instance which is still not refreshed with the new release.

There the error message is displayed only once.

So, I am not getting if this is a new release issue.

 

Please let me know your suggestions.

 

Thanks

Arvind

  • September 24, 2010
  • Like
  • 0

Hi All,

 

I have a VF page. I have used this VF page in a Visualforce tab.

 

There are with 3 tabs inside  this VF page within tabpanel.

In one tab, there is a selectlist to display the queues. The queues are queried from the controller.

Selecting a queue will display the cases associated with that queue.

 

In the second tab, I am using enhancedlist:

 

<apex:enhancedList type="Case">

 This will display all the views in the list. Selecting a queue will display the cases related to that queue.

 

When I click on any other tab (which is not the tabpanel of VF page) like Accounts or Contacts and come back to this page and go to the second tab, the value selected previously in the enhancedlist is being retained.

 

 

But the value selected in the selectlist present in the first tab is not being retained.

 

Is there any way to accomplish the retaining of values in the selectlist of first tab.

Any suggestions will be helpful.

 

Thanks

Arvind

  • September 15, 2010
  • Like
  • 0

Hi,

 

I am calling a method from my controller every 5 seconds.

But I want to dynamically change the interval by adding a custom setting and calling the custom setting in apex class and

referring that in the interval attribute of actionpoller.

 

But when I tried that, the method is not getting called every 5 seconds. It is taking the default interval as 60 seconds.

 

I also tried by creating an Integer variable in the controller and called that in the interval attribute of actionpoller.

 

Following is my code which I am trying:

public class exampleCon {
    Integer count = 0;
     Integer interval=5;                   
    public PageReference incrementCounter() {
        count++;
        return null;
    }
    public Integer getinterval(){
        return interval;
    }                 
    public Integer getCount() {
        return count;
    }
}

 

<apex:page controller="exampleCon">
    <apex:form >
        <apex:outputText value="Watch this counter: {!count}" id="counter"/>
        <apex:actionPoller action="{!incrementCounter}" rerender="counter" interval="{!interval}"/>
    </apex:form>
</apex:page>

 

 

Please let me know any suggestions.

 

Thanks

Arvind

 

Hi All,

 

I have a requirement where I have to display an alert message first time when the case owner opens the case detail page.

 

The alert should not be displayed when the case owner opens the case detail page for the second time.

For this when the user clicks on Ok on alert box first time, I want to call a controller method to insert a record in an object and then by using the record count of this object, I am displaying the alert only when the count is 0.

 

But I am not able to call the controller method after the alert.

 

Following is the code I am using.

<apex:page showHeader="false" standardController="Case" extensions="Sendemailinsert" action="{!countemail}">
  <script language="javascript">
     function test(){
        
       if({!usercheck}==true)
       alert('Golden Rules for this account were updated after the last updates were made for this case. Please review golden rules before working on this case.');
     }
  </script>
  <body onLoad="javascript&colon; test();">
    
  <p></p>
 
  </body>
  
</apex:page>

 

public class Sendemailinsert {

Case objcas=new Case();
Case cs=new Case();
    public Sendemailinsert(ApexPages.StandardController controller) {
    cs=(Case)controller.getrecord();
    objcas=[select ownerid from Case where id=:cs.id];
    system.debug('owner'+objcas.ownerid);
    }
    public Case getcs(){
        return objcas;
    }
    public Boolean getusercheck(){
        system.debug('userid'+userinfo.getuserid());
        system.debug('ownerid'+objcas.ownerid);
        if(objcas.ownerid==userinfo.getuserid() && emailcount==0)
            return true;
        else 
            return false;
    }
    public Integer emailcount{get;set;}
    public void countemail(){
      emailcount=[select count() from Send_Email__c where Case__c=:cs.id and Sent__c=true and Notification_Type__c='GR Popup'];  
    }
    public pagereference sendemailsave(){
    Send_Email__c obj_sendemail=new Send_Email__c();
    obj_sendemail.Case__c=cs.id;
    obj_sendemail.Sent__c=true;
    obj_sendemail.Notification_Type__c='GR Popup';
    obj_sendemail.Notification__c='Golden Rules for this account were updated after the last updates were made for this case. Please review golden rules before working on this case.';
    insert obj_sendemail;
    pagereference pg=new pagereference('/'+cs.id);
    pg.setredirect(true);
    return pg;
    }
}

 

Here I am not able to understand where should I call the sendemailsave method. I tried to give this inside the function test(). But it throwed an error "Unknown property 'CaseStandardController.sendemailsave'".

 

Any suggestion will be helpful.

 

Thanks

Arvind

 

Hi All,

 

I have a requirement to insert data in rich text area field through code. In the data which goes to the field,

some of the text should be bold.

 

How to make a text bold while inserting through code?

 

Thanks

Arvind

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 All,

 

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

I am displaying the Questions and the related answers in datatable.

 

Here I am displaying some empty circles. The number of empty circles will be same as the number of circles.

Whenever the user selects an answer, the empty circle will go and the highlited circle will be in that place.

 

Following is the code I am using

<apex:page controller="SuitabilitySurveycontroller" action="{!loadsurveyquestions}" showHeader="true" sidebar="false">
<style>
        .redChar{
            background-color:#659EC7;
            color:#FFFFFF;
            font-size: 18px;
            padding:5px;
            
        }
        .bluechar{
            background-color:#E0FFFF;
            font-size: 11px;
            
        }
        .bluechar1{
            background-color:#E0FFFF;
            font-size: 24px;
            
        }
        
        .container{
            background-color: #7A5DC7;
            color: #FFFFFF;
            font-size: 20px;
            
            text-align: center;
        }
    </style>
  <apex:form >
  <apex:outputpanel id="theimage">
      <apex:repeat value="{!circl}" var="noq">
          <apex:image value="{!$Resource.EmptyCircle}" width="50" height="50"/>

      </apex:repeat>
      <apex:repeat value="{!circl2}" var="noq">

          <apex:image value="{!$Resource.FilledCircle}" width="50" height="50"/>
      </apex:repeat>
</apex:outputpanel>
          <apex:dataTable value="{!surveyListPage}" var="surveyqns" cellpadding="10" width="1000px" captionClass="bluechar1">
              <apex:facet name="caption">{!stepno}</apex:facet>&nbsp;&nbsp;&nbsp;&nbsp;
              <apex:outputPanel id="theImage1">
              <apex:image id="theImage" value="{!$Resource.EmptyCircle}" width="50" height="50" rendered="{!im}"/>
              </apex:outputPanel>
              <apex:column rendered="{!ISNULL(surveyqns.question.Question_Name__c)}" styleClass="redChar">
                   <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))}" styleClass="redChar">
                  <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'}" styleClass="bluechar">
                  <apex:selectRadio value="{!surveyqns.response.Response_Text__c}"
                  rendered="{!surveyqns.question.Type__c == 'Radio'}" layout="pageDirection">
                            <apex:selectOptions value="{!surveyqns.ansop}"/>
                            <apex:actionsupport event="onclick" rerender="theimage" action="{!incrementCounter}"/> 
                        </apex:selectRadio>
              </apex:column>
              <apex:column styleClass="bluechar">
                  <apex:inputField value="{!surveyqns.response.Response_Number__c}" rendered="{!surveyqns.question.Type__c == 'Number'}">
                  <apex:actionsupport event="onchange" rerender="theimage" action="{!incrementCounter}"/>
                  </apex:inputField>
              </apex:column>
              <apex:column styleClass="bluechar" rendered="{!surveyqns.question.Type__c == 'Currency'}" breakBefore="true">
                  <b><apex:outputLabel >{!$ObjectType.Response__c.fields.Application_Name__c.label}</apex:outputLabel></b>&nbsp;&nbsp;
                  <apex:inputField value="{!surveyqns.response.Application_Name__c}"/><br/><br/>
                  <b><apex:outputLabel >{!$ObjectType.Response__c.fields.Data_Center_Infrastructure__c.label}</apex:outputLabel></b>&nbsp;&nbsp;
                  <apex:inputField value="{!surveyqns.response.Data_Center_Infrastructure__c}"/><br/><br/>
                  <b><apex:outputLabel >{!$ObjectType.Response__c.fields.Hardware_Infrastructure__c.label}</apex:outputLabel></b>&nbsp;&nbsp;
                  <apex:inputField value="{!surveyqns.response.Hardware_Infrastructure__c}"/><br/><br/>
                  <!--<b><apex:outputLabel>{!$ObjectType.Response__c.fields.Software_License_and_Maintenance_fees__c.label}</apex:outputLabel></b>&nbsp;&nbsp;
                  <apex:inputField value="{!surveyqns.response.Software_License_and_Maintenance_fees__c }"/><br/><br/>-->
                  <b><apex:outputLabel >{!$ObjectType.Response__c.fields.Application_Development__c.label}</apex:outputLabel></b>&nbsp;&nbsp;
                  <apex:inputField value="{!surveyqns.response.Application_Development__c}"/><br/><br/>
                  <b><apex:outputLabel >{!$ObjectType.Response__c.fields.Application_Maintenance__c.label}</apex:outputLabel></b>&nbsp;&nbsp;
                  <apex:inputField value="{!surveyqns.response.Application_Maintenance__c}"/><br/><br/>
                  <b><apex:outputLabel >{!$ObjectType.Response__c.fields.Infrastructure_Administration__c.label}</apex:outputLabel></b>&nbsp;&nbsp;
                  <apex:inputField value="{!surveyqns.response.Infrastructure_Administration__c}"/><br/><br/>
                  <b><apex:outputLabel >{!$ObjectType.Response__c.fields.Software_License_and_Maintenance_fees__c.label}</apex:outputLabel></b>&nbsp;&nbsp;
                  <apex:inputField value="{!surveyqns.response.Software_License_and_Maintenance_fees__c}"/><br/><br/>
                  
              </apex:column>
          </apex:dataTable>
          <center><apex:commandButton value="Next" action="{!captureresponse}"/></center>
      
  </apex:form>
  <script type="text/javascript">
  function call(){
  alert('alert');
  }
  </script>
</apex:page>

 

public class SuitabilitySurveycontroller {

boolean selec=false;
List<String> tests=new List<String>();
integer dispCount;
integer dispCount2;
 public void incrementCounter() {
     system.debug('tests------'+tests.size());
     system.debug('dispCount2------'+dispCount2);
     system.debug('inside method');
     if(noofquestions>dispCount2){ //&& dispCount2==tests.size()){
         system.debug('tests------'+tests.size());
        //for(SurveyItem ss:surveyListPage)
        //tests.add(ss.response.Response_Text__c);
        dispCount--;
        dispCount2++;
        
        }
        
    }


public List<string> getcircl(){
    String[] x=new String[dispCount];
    for(integer i=0;i<x.size();i++)
        x[i]='ex';
        
    return x;
}
public List<string> getcircl2(){
    String[] x=new String[dispCount2];
    for(integer i=0;i<x.size();i++)
        x[i]='ex';
        
    return x;
}

List<Question__c> questionlist = new List<Question__c>();
List<Answer__c> anslist = new List<Answer__c>();
public Integer noofquestions{get;set;}
String stepnumber;
Set<Id> Questionsid = new Set<Id>();
Map<Id,List<Answer__c>> ansmap = new Map<Id,List<Answer__c>>();
public List<SurveyItem> surveyListPage{get; set;}
List<Response__c> responselist = new List<Response__c>();
String stepno;
public Map<Id,Response__c> responseMap = new Map<Id, Response__c>();

Boolean selet=false;
    public Boolean getim(){
        selet=true;
        return selet;
    }

    public SuitabilitySurveycontroller(){
        stepnumber = system.currentpagereference().getparameters().get('step');
        System.debug('step-------'+stepnumber);
        noofquestions = [select count() from Question__c where Step__c=:stepnumber];
        dispCount=noofquestions;
        dispCount2=0;
        system.debug('count----'+noofquestions);
        questionlist = [select id,name,Question_Number__c,Type__c,Question_Name__c from Question__c where Step__c=:stepnumber order by Question_Number__c];
        system.debug('questionlist------'+questionlist);
        for(Question__c qnid:questionlist)
            Questionsid.add(qnid.id);
        anslist = [select Question__c,name from Answer__c where Question__c in :Questionsid order by name desc];
        system.debug('anslist------'+anslist);
        for(Answer__c ans:anslist){
            List<Answer__c> theList=ansmap.get(ans.Question__c);
            if (null==theList){
                theList=new List<Answer__c>();
                ansmap.put(ans.Question__c,theList);
              }
              theList.add(ans);
        }
        system.debug('ansmap--------'+ansmap);
    }
    public void loadsurveyquestions(){
        surveyListPage = new List<SurveyItem>();
        for(Question__c qn:questionlist){
        Response__c re = responseMap.get(qn.id);
        if ( re == null ) {
            re = new Response__c(question__c = qn.id);  
            responseMap.put(qn.id, re);
        }
            surveyListPage.add(new SurveyItem(qn,ansmap.get(qn.id),re));
            
        }
    }
    
    public class SurveyItem{
        public Question__c question { set; get;}
        List<Selectoption> ansop = new List<Selectoption>();
        public List<Selectoption> getansop(){
        return ansop;
        }
        //public String questionumber{get;set;}
        
        public Response__c response  { set; get;}
        public SurveyItem(Question__c q,List<Answer__c> answ,Response__c resp){
            system.debug('inside wrapper class-----------'+q+'----'+answ);
            question=q;
            if(answ!=null){
            for(Integer i=0;i<answ.size();i++){
                ansop.add(new selectoption(answ[i].name,answ[i].name));
        }
        }
        response = resp;
        //questionumber =q.Question_Number__c + ' of '+ noofquestions;
    }
    }
    
    public String getstepno(){
        stepno = 'Step '+stepnumber;
        return stepno;
    }
    public pagereference captureresponse(){
        for(SurveyItem responsecapture:surveyListPage){
            
            responselist.add(responsecapture.response);
        }
        insert responselist;
        if(stepnumber!='9'){
            system.debug('stepnumber in save--------'+Integer.valueof(stepnumber));
            Integer stepno = Integer.valueof(stepnumber)+1;
            system.debug('secondstep number--------'+stepno);
            pagereference p = new pagereference('/apex/SuitabilitySurveywizard?step='+stepno);
            p.setredirect(true);
            return p;
        }
        else{
            pagereference p = new pagereference('http://www.google.com');
            p.setredirect(true);
            return p;
        }
        
    }
}

 

 

But the issue I am facing is, after selecting an answer if the user changes the answer of the same question, the

second empty circle is getting vanished and a new filled circle is getting in place there.

So after answering a single question, two highlited circles are being displayed.

 

How many times the answer is clicked, that many highlited circles are being displayed.

 

I am not able to understand how to solve this issue.

 

Any suggestions will be helpful

 

Thanks

Arvind

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 am a newbie to webservice. So just tried to create my first webservice.

 

I created the helloworld webservice class in one salesforce instance. I generated wsdl file from that.

 

I parsed this wsdl file to generate an apex class in another salesforce instance. I wrote a trigger and called an apex class

 

In the apex class I called the stub class of the parsed apex class. But I am getting the following error:

 

System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor=

 Following is the code of my apex class:

 

public class testwebser{ @future(callout=true) public static void webmethod(Id aa){ String strAuthorizationHeader, strUserName,strPassword; Blob blbHeaderValue; soapSforceComSchemasClassHelloworld.HelloWorldWebService hwb = new soapSforceComSchemasClassHelloworld.HelloWorldWebService(); soapSforceComSchemasClassHelloworld.SessionHeader_element objSession = new soapSforceComSchemasClassHelloworld.SessionHeader_element(); strUserName = 'arvind.rao1@wipro.com.dev'; strPassword = 'hijacker56UF0IfKl12C9S1Jj9KY5uPMp'; blbHeaderValue = Blob.valueOf(strUserName + ':' + strPassword); strAuthorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(blbHeaderValue); hwb.inputHttpHeaders_x = new Map<String,String>(); system.debug('header'+strAuthorizationHeader); hwb.inputHttpHeaders_x.put('Authorization', strAuthorizationHeader); hwb.inputHttpHeaders_x.put('myHeader','myValue'); hwb.SessionHeader =new soapSforceComSchemasClassHelloworld.SessionHeader_element(); String x=hwb.sayHello('hhhh'); System.debug('testing'+x); } }

 

 I am not able to understand what am I missing here.

 

Any suggestion will be of a great help.

 

Thanks

Arvind

 

Hi All,

 

We are trying to integrate SAP to SFDC. The process is to pass the Product Code from Salesforce and retrieve the pricing information from SAP.

 

One of the approach we thought is:

The pricing information will be stored as an attachment in SAP system.

The pricing information will be stored in SAP system. We will parse the wsdl file of SAP to generate apex class. The method should be that when we pass the Product code, we have to retrieve the pricing attachment from SAP system and store the same as an attachment in our Product object.

 

So following are my questions:

 

1. Can the wsdl file hold attachments also?

2. Can we collect attachments in apex code and create them in the instance?

 

If yes, what will be the datatype for collecting that and how do we convert that datatype to attachment type to store it

 

Any suggestions will be of a great help

 

Thanks

Arvind

Hi,

 

I have to load data from SAlesforce.com to SQL server on daily basis.

I have used dataloader(using config files) connected to SQL server.

I have some date fields in extraction of SFDC which needs to be loaded to SQL server.

 

While loding am getting error has error sql:conversion from date and\or time to string converiosn.

 

I tried with the following values.

 

<entry key="DATEOFBIRTH"        value="java.lang.String"/>
<entry key="DATEOFBIRTH"        value="java.util.Date"/>

 

Please help in this.

 

Thanks

 

Hi All,

 

The dashboard runs based on the running user. Clicking on the dashboard, it takes to the report which shows the data

which shows the data based on the access level of the current user.

 

I have a requirement where clicking on the dashboard, the user should see the report data based on the running user.

 

I know this is against the standard functionality.

 

But is there any way to accomplish this?

 

Thanks for any suggestions

 

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

Hi,

 

Need some help with widget implementation -  

  1. Can we place a Salesforce.com widget on a company portal and give access to people who do not have access to salesforce.com but only to the company portal?
  2. Can we use one login for integrating the widget with salesforce.com and give access to many users on the company portal?
  3. Can we embed the opportunity homepage on the company portal using widgets?

Any help will be appreciated.

 

Thanks,

Arvind

Hi,

 

What is the limit on number of emails that can be sent via Standard Send an Email functionality ('Send an Email' button)?

 

What is the limit on number of inbound emails in salesforce.com ?

 

Which mails contribute to the limitation of 1000 mails per day (mentioned for mass mails)?

 

Any help will be appreciated.

 

Thanks,

Arvind

Hi All,

 

I have a query in my apex class where I am querying Accounts which are enabled as Partner Accounts by checking IsPartner=true.

 

In my test method I am trying to insert an Account and enable it as Partner Account like:

Account partneraccount=new Account(Name='test1',ispartner=true); insert partneraccount;

 

 But I am getting an error like IsPartner not writable.

 

I am not getting how do I enable Account as partner in test method.

 

Any suggestion on this will be of a great help.

 

Thanks

Arvind

Hi,

 

I have a number field on Case called "No_Case_owner_changes__c" which has a default value of 0.

 

When the Case is created, I have to set the value of the above field to 1 if the "Assign using active assignment rules" is unchecked.

 

But if the "Assign using active assignment rules" is not checked when the case is created, the value of the field should remain 0.

 

So, I wanted to know is there any way I can check if "Assign using active assignment rules" is checked or not in a Case trigger.

 

Any suggestion will be helpful

 

Thanks

Arvind

 

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 
 
  • September 09, 2008
  • Like
  • 0