• Arpita
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies

I have a related list for "Assets" on my Accounts Page Layout.  There is a particular value in the Assets related list - Deployment Type.  Deployment Type is a picklist field with 3 different possible values.

 

I would like to be able to create a new Case under that Account and pull the value in the Deployment Type field of the Assets related list on the Account page into a new custom field on the Case Page Layout.

 

Is this possible?

HI all,

 

          I am  using  actionPollar tag   , and i set the time inteval  5 secs, so that means for every 5 secs the page is refreshed. 

How can i stop refreshing  after 5 refreshes,  iam using  action pollar in  my vf page

 

vf page:

-------------

<apex:page controller="Records20" sidebar="false" >
<apex:form >
<apex:outputpanel rendered="{!displayRecords}" >

<apex:pageblock Title="Answers the Questions">

<b><apex:outputText value="Your Time Starts Now: {!Timer}:00 Min" id="counter"/></b>
<apex:actionPoller action="{!incrementCounter}" rerender="counter " interval="15"/>
<br/>
<br/>

<apex:pageBlockButtons location="bottom">

<apex:commandButton value="Submit" action="{!saveAnswer}" id="button"/><br/>
</apex:pageBlockButtons>
<apex:repeat value="{!items1}" var="it">
<apex:outputText value="{!it.intSerial}"> </apex:outputText>).&nbsp;<apex:outputText value="{!it.strQuestion}"></apex:outputText>
<apex:SelectRadio value="{!it.answer12}">
<apex:selectoptions value="{!it.itemsWrap}"/>
</apex:SelectRadio><br/>
</apex:repeat>
</apex:pageblock>
</apex:outputpanel>
YOUR RESULT IS:&nbsp;&nbsp;<apex:outputText value="{!intCount}"></apex:outputText>
</apex:form>
</apex:page>

__________

controlle---

 

 

public class Records20{

public Integer Timer;
public boolean displayRecords{set;get;}
public string answer1{set;get;}
public List<selectOption> selItems {get;set;}
public integer intCount{get;set;}
list<wrapperQuestions> objwraplst = new list<wrapperQuestions>();
list<Questiuons__c> ques=new list<Questiuons__c>();


public Records20()
{
Timer=0;
displayRecords=true;
list <Questiuons__c> ret=[SELECT id,Question__c,Answers__c,Correctanswer__c FROM Questiuons__c LIMIT 20 ];
ret = ObjectRandomizer.randomizeList (ret);
integer serial=0;
for(Questiuons__c a :ret )
{
System.debug('aaa'+a);
String s = a.Answers__c;
list<string> st =s.split(',');
wrapperQuestions objWrap = new wrapperQuestions();
objWrap.strQuestion = a.Question__c;
objWrap.correctAnswer=a.Correctanswer__c;
serial=serial+1;
objWrap.intSerial=serial;
selItems = new List<selectOption>();
for(String str:st)
{
selItems.add(new SelectOption(str,str));

objWrap.itemsWrap=selItems;

}

objwraplst.add(objWrap);

}
}

public void saveAnswer()
{
intCount=0;
for(wrapperQuestions objwrap:objwraplst)
{
system.debug('::::::::::::'+objwrap.answer12);
if(objwrap.answer12==objwrap.correctAnswer)
{
//intCount = intCount+1;
intCount++;
displayRecords=false;

}else
displayRecords=false;
}

}

public PageReference incrementCounter() {
if(Timer<=5)
Timer++;
system.debug('@@@@@@@@@@@'+timer);
return null;
}

public Integer getTimer() {
system.debug('!!!!!!!!!!!!!!'+timer);
return Timer;
}
public list<wrapperQuestions> getitems1()
{
return objwraplst;
}


public class wrapperQuestions
{
public string strQuestion{get;set;}
public integer intSerial{get;set;}
public List<selectOption> itemsWrap {get;set;}
public string answer12{set;get;}
public string correctAnswer{set;get;}

}

}

  Any one can help me

  • September 03, 2012
  • Like
  • 0

I have had the audit fields (created by, created dates, last modified by, etc) opened by sfdc, and need to see if there is a way to populate these via an update rather than an insert. Through the data loader, they are only available via insert. Is this a data loader limitation or a salesforce limitation? We also have DB Amp, and do not have access on an update either. Anyway around this?