• Arpi
  • NEWBIE
  • 50 Points
  • Member since 2013

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 24
    Replies

All,

 

I have a reuirement in whivh I have 2 tables with different fields.There is a field called "Unit No" in table A which should match with "Catalog No" of table B. So I want to do 3 things:-

1)Do left outer join to get all records of Table A and records of Table B with match on Unit No and Catalog No.

2)Do right outer join to get all records of Table B and records of Table A with match on Unit No and Catalog No.

3)Inner join with matching records from both tables.

 

I tried using IN but than I need Id value for comarison and my Unit No and Catalog No fields are not the name/Id field, they are normal salesforce custom text fields.

 

Any hep is greatly appreciated.

  • August 26, 2013
  • Like
  • 1

Can we make our pages XHML compliance?

 

How can we guarantee that our vf page which uses vf tags and components are XHTML compliant?

  • August 15, 2013
  • Like
  • 0

Hello,

 

I have 2 queries regarding the salesforce to salesforce inbuilt functionality.

1) So i followed the steps to publish and subscribe fields of object.On the target org the record can be updated by the target user. My requirement is I just want to share specific records but do not want the other org to update any of my records. I am assuming there should be some setting we can do on our profiles but when I read more I found you cannot see the profile of this Connection User.

So is theer a way to set records to read only for Connection uSer only?

 

2)Record level sharing is manual and automatic but I couldnt find a way to autoate the process for specific records. Is there a way to automate shring of specific records and on target automate with some logic to accept it( not auto check as it accepts everything)?

 

Thanks 

 

  • July 30, 2013
  • Like
  • 0

All,

 

I have a requirement in which I have to create a dropdown with option text,picklist and multiselect picklist and depending on what user selects I have to craete those with user inputting the values of each.

 

Seems like a simple thing but I cant create the dependent field. 

 

Thanks

  • July 23, 2013
  • Like
  • 0

All,

 

I have a requirement in which I have an external website and I want a link or anything that points to salesforce dashboard without logging in to salesforce.

 

I think I have to create a force.com site and in vf page have a iframe tag with the dashboard but on the discussion boards I am seeing that the guest user doesnt have access to dashboards even when in visualforce.

 

Also I have other force.com site under same domain so I do not want to share the same guest user profile for all my sites.

 

Is there any other way other than force.com sites? Can I just make a particular object like public or something and view that dashboard.

 

 

Thanks

  • July 22, 2013
  • Like
  • 0

Hello,

I have a requirement in which I have to upload a pic and get the current location of salesforce user .My current app is not a mobile app.My question is that do I need to create a mobile app or is there some other way to access the fields geolocation and rich text area for pic upload.
If I have to create a mobile app than how can I integrate my current non mobile app or use some of the objects from it .

Thanks

  • June 27, 2013
  • Like
  • 0

Hello,

 

I have a requirement in which I have to upload a pic and get the current location of salesforce user .My current app is not a mobile app.My question is that do I need to create a mobile app or is there some other way to access the fields geolocation and rich text area for pic upload.

If I have to create a mobile app than how can I integrate my current non mobile app or use some of the objects from it  .

 

Thanks.

  • June 24, 2013
  • Like
  • 0

Hello,

 

I have a vf page with action attribute

 

<apex:page standardController="object1" extensions="class2" recordSetVar="sitem" action="{!sectionStat}">

 

now in my class i have this method which does the DML operation.

 

pulic void sectionStat()

{

...

...

 

try
                    {
                        upsert StatusLists;
                    }
                     catch(DmlException e){System.debug('~~~~~~~~~~~~~EXCEPTION --'+e);}  

 

}

 

Now when I do CheckMax security scanner it gives me XSRF error.

 

Than I tried to call this method from the constructor but I suppose you cannot call a DML operation from a constructor.

 

So I do not know what to do .

 

Please help on how to solve this issue.

Thanks

  • March 13, 2013
  • Like
  • 0

Hello,

 

I have a long text area data type field and when I run the vf page which displays it, I can stretch in chrome but I dont see any where in IE.

Do we have to put any code for it so that we can stretch it using our mouse from bottom right corner.

 

Thanks

  • March 04, 2013
  • Like
  • 0

Hello,

 

I have a visualforce page below which displays part of the data but skips the response.

Belo is the code

 

<apex:page sidebar="false" standardStylesheets="true" Controller="QuestionnaireFieldsReport" renderAs="pdf">
<apex:panelGrid columns="1" id="theGrid" title="{!templateName}">
<apex:repeat value="{!Sections}" var="sec" >
<br/>
<!-- display section -->
<apex:panelGrid columns="2" title="{!sec.section.Section_label__c}">
<br/>
<apex:repeat value="{!sec.questions}" var="q" >
<!-- display questions -->
<apex:outputField value="{!q.Question_Label__c}" /> <br/>


<!-- display answer  BELOW TEXT IS NOT DISPLAYED-->
<apex:outputText value="{!sec.response[q.Id].Response__c}" rendered={!IF(NOT(ISNULL(sec.response[q.Id])),'true','false')}" /> 
</apex:repeat>

</apex:panelGrid>

</apex:page>

 

Thanks

 

  • March 01, 2013
  • Like
  • 0

Hello All,

I have a visualforce page that displays the google maps correctly for all accounts but I submitted for security review online and it give me errors on the bold lines(below in code)

 

The error from report

Query Name - Stored_XSS
Severity - Critical
5. public List<Account> getlistacc() //displaylocationmap.cls
       
...
7. accounts=[SELECT id,BillingStreet,BillingCity,BillingPostalCode,BillingCountry,name From Account where
BillingStreet <>NULL and BillingPostalCode<>NULL];
...
10. return accounts;
79. arraddress[i]='!a.BillingStreet}!a.BillingCity}!a.BillingPostalCode}!a.BillingCountry}'; //locationschool.page

 

 

My code-----

<apex:page controller="DisplayLocationMap" showHeader="false" sidebar="false" standardStylesheets="false">
<apex:include pageName="BannerTemplate"/>
<html >
<head>

<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
var arraddress= new Array();
var arrids= new Array();
var content=new Array();
var arrnames= new Array();
var i=0;
var map;
var geocoder;
function initialize() {
var mapDiv = document.getElementById('map-canvas');

map = new google.maps.Map(mapDiv, {
zoom: 5,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
google.maps.event.addListenerOnce(map, 'idle', addMarkers);
}

function addMarkers() {
for (var i = 0; i < arraddress.length; i++) {
content[i] = '<b><i>'+arrnames[i]+' </i></b><br/>'+' '+arraddress[i];
var latlng = geocodeAddress(arraddress[i],arrids[i],content[i]);
}
}
function geocodeAddress(addds,id,content)
{
geocoder = new google.maps.Geocoder();
geocoder.geocode( { 'address': addds}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
var infowindow = new google.maps.InfoWindow({
content: content
});
google.maps.event.addListener(marker, 'mouseover', function() {
infowindow.open(map,this);
});
google.maps.event.addListener(marker, 'mouseout', function() {
infowindow.close();
});
google.maps.event.addListener(marker, 'click', function() {
window.open('/'+id);
});
}
else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}

google.maps.event.addDomListener(window, 'load', initialize);
</script>
<style>
#map-canvas {
font-family: Arial;
font-size:12px;
line-height:normal !important;
height:750px;
background:transparent;
}
</style>


</head>
<body>
<div id="map-canvas"></div>
<apex:repeat value="{!listacc}" var="a">
<script>
arraddress[i]="{!a.BillingStreet},{!a.BillingCity},{!a.BillingPostalCode}{!a.BillingCountry}"; //ERROR ON THESE BOLD 
arrids[i]="{!a.id}"; //LINES
arrnames[i]="{!a.name}";
i++;
</script>
</apex:repeat>
</body>
</html>
</apex:page>

 

 

Controller

public List<Account> accounts=new List<Account>();

public List<Account> getlistacc()
    {
       accounts=[SELECT id,BillingStreet,BillingCity,BillingPostalCode,BillingCountry,name From Account where BillingStreet <>NULL and BillingPostalCode<>NULL];
       return accounts;
    }

}

  • February 26, 2013
  • Like
  • 0

Hello,

I  have a visualforce page in which I am rerendering the output panel based on a command link clicked.My issue is i get the question list with selectoption but the response takes time or sometimes some of the questions response show up in vf page.

So I think if I could find some way to call the function on click and than oncomplete rerender output panel than it should work.

 

vf code is

<apex:repeat value="{!sectionsStatusLists}" var="section">
<apex:commandButton reRender="questiondetail" value=" {!section.Section_Template__r.Section_label__c}" style="text-align:center;">
<apex:param name="sectionId" value="{!section.Section_Template__r.id}"/>
</apex:commandButton>
</apex:repeat>

<apex:outputPanel id="questiondetail" >
<apex:pageBlock id="block1">

<apex:repeat value="{!questionsList}" var="question" >
<apex:pageBlockSection columns="1" rendered="{!question.newquestFormat.Question_Type__c=='RadioPicklist'}" >
<apex:outputPanel rendered="{!NOT(ISNULL(question.newquestFormat.HelpText__c))}"><b>Q.{!qnum} {!question.newquestFormat.Question_Label__c}</b><span class="helpButton" id="help1_Help"><img src="/s.gif" alt="" class="helpIcon" title="{!question.newquestFormat.HelpText__c}"/></span>
</apex:outputPanel>
<apex:outputPanel rendered="{!ISNULL(question.newquestFormat.HelpText__c)}"><b>Q.{!qnum} {!question.newquestFormat.Question_Label__c}</b>
</apex:outputPanel>
<apex:pageBlockSectionItem >
<apex:selectRadio layout="pageDirection" id="qOptionList" value="{!question.resObj.Response__c}">
<apex:selectOptions value="{!question.optionsList}"/>
</apex:selectRadio>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:repeat>

 

 

apex declaration code is this ,QuestionDisplay is the inner class

public List<QuestionDisplay> getquestionsList()
{

//get the section id from visualforce page using Apex.pageReference.getParameters

//create a select option list for the questions and the options for the questions

//get the response for the question

}

 

Thanks all

 

  • February 15, 2013
  • Like
  • 0

Hello,

 

I am new to this and I want to test a simple class below but it is not executing my sql queries but through the visualforce page this works fine.

Please guide me what I am doing wrong.

 

public with sharing class FetchDocumentId
{

public String documentname{ get; set; }
public String docid{ get; set; }

public string getdocId()
{
return docid;
}
public void documentId()
{
documentname=System.currentPageReference().getParameters().get('documentname');
System.debug('doc name:'+documentname);
//documentname='Checklist_Comment_and_Feedback_Template';
try{
List<Document> lstDocument = [Select Id,Name from Document where Name =:documentname limit 1];
System.debug('!!!!!!!!!!!!!'+lstDocument);//always null
string strOrgId = UserInfo.getOrganizationId();
string strDocUrl = 'https://'+ApexPages.currentPage().getHeaders().get('Host')+ '/servlet/servlet.FileDownload?file='+lstDocument[0].Id+'&oid=' + strOrgId;
System.debug('doc url'+strDocUrl );
docid=lstDocument[0].Id;
System.debug('docid:'+docid);
}catch(Exception e){System.debug('Document not found');}
//return docid;
}

public static testmethod void testdocumentId()
    {
      FetchDocumentId d= new FetchDocumentId();

//This is the page that uses this controller
      Test.setCurrentPageReference(new PageReference('Page.OHSESMain')); 
      System.currentPageReference().getParameters().put('documentname', 'Checklist_Comment_and_Feedback_Template');
     
       Test.startTest();
       
       d.documentId();
       String docmentId=d.getdocId();
       Test.stopTest();
       
        //assert results
       System.assert(docmentId!=null,'Document is null');
        
     }

}

 

Thanks

  • February 12, 2013
  • Like
  • 0

hello,

 

I have the below vf page as below. When I click the section label ({!section.Section_Label__c}) it would rerender questiondetail block and the page should scroll with top being the data from reender but when I click if I try to scroll to any componenet in the questiondetail block it didnt work,so I had to do it the way below which just shifts littlle not to the start of the data below button.I think it may be because it takes time for data to come from backend.

Q1)Is there any other way I can scroll to the data below save button.

Q2)Is there a way to have some event fire only when the data is completely loaded into the frontend and than scroll or do something.

 

<script language="JavaScript" type="text/javascript">

function scrollWin() {
window.scrollTo(0, 800);

}

</script>

<apex:form id="templateForm">

<apex:pageBlock >


<apex:pageBlockSection id="sectionBlock" title="{!templateName}" columns="1">
<apex:repeat value="{!sectionsStatusLists}" var="section">
<apex:commandLink reRender="questiondetail" onclick="scrollWin()">
<h3>{!section.Section_Label__c}
</h3>
<apex:param name="sectionId" value="{!sectionid}"/>
</apex:commandLink>
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlock>

<apex:outputPanel id="questiondetail" >
<apex:pageBlock id="block1">

<script>
function focu(){
var e = document.getElementById('{!$Component.buttons1.button1}');
//var e = document.getElementById('thePage:templateForm:questiondetail:block1:buttons1:button1');
e.focus();
}
</script>
<apex:pageBlockButtons location="bottom" id="buttons1" >
<apex:commandButton value="Save" action="{!Save}"  id="button1"/>
</apex:pageBlockButtons>

<apex:repeat value="{!questionsList}" var="question" >

<apex:pageBlockSection columns="1" rendered="{!question.newquestFormat.Question_Type__c=='Text'}" >

<apex:pageBlockSectionItem >
<apex:outputField value="{!question.Subquestion_Label__c}" />
<apex:inputTextarea style="" rows="6" cols="100" id="textInfo" value="{!question.resObj.Response__c}"></apex:inputTextArea>
</apex:pageBlockSectionItem>
</apex:pageBlockSection><br></br>

<apex:pageBlockSection columns="1" rendered="{!question.Question_Type__c=='RadioPicklist'}" >
<apex:outputPanel rendered="{!NOT(ISNULL(question.HelpText__c))}"><b>Q.{!qnum} {!question.Question_Label__c}</b><span class="helpButton" id="help1_Help"><img src="/s.gif" alt="" class="helpIcon" title="{!question.newquestFormat.HelpText__c}"/></span>
</apex:outputPanel>

<apex:pageBlockSectionItem >
<apex:selectRadio layout="pageDirection" id="qOptionList" value="{!question.resObj.Response__c}">
<apex:selectOptions value="{!question.optionsList}"/>
</apex:selectRadio>
</apex:pageBlockSectionItem>
</apex:pageBlockSection><br></br>
</apex:repeat>
</apex:pageBlock>

</apex:outputPanel>

</apex:form>

 

  • February 07, 2013
  • Like
  • 0

Hello,

 

Is there a way to retrieve list of dashboards from a folder.The way reports can be retrieved using 

 

folder[] ff = [select id,name from folder where name = 'DOI BI Reports'];
id fid = (ff.isEmpty()) ? null : ff[0].id;
List<Report>  listReports = [select id, name from report where ownerid = : fid];

 

I do not want to use id directly as it chnages when we deploy to a new instance.

 

 

Thanks

  • February 07, 2013
  • Like
  • 0

Hello,

 

I have a 2 lists which i want to display alternatively.

My code is 

 

<apex:repeat value="{!questionsList}" var="section">
<apex:variable var="rlists" value="{!section.rlistss}"/>
<apex:variable var="i" value="{!0}"/>
<apex:repeat value="{!section.qlistss}" var="qlist">
<apex:outputField value="{!qlist.Question_Label__c}" />
<apex:outputField value="{!rlists[i].Response__c}" /> <!--This doesnt workhow to iterate this also after each question display 1 response-->
<br> </br>

</apex:repeat>

 

 

Thanks

  • January 29, 2013
  • Like
  • 0

hello,

 

I have tables for sections,questions and response with master detail relationship between sction and question, question and response table. I want to display all of them with response under question and all questions under section.

 

Apex code 

public class QuestionnaireFieldsReport
{

public List<Question_Template__c> questionsLists { get; set; }
public List<Section_Template__c > sectionsLists{ get; set; }
public List<Questionnaire_Response__c> QuestionResponse{get;set;}
public List<QuestionDisplay> listQuestWithOptions;

 

//create a new inner class 
public class QuestionDisplay
{

public Question_Template__c newquestFormat{get;set;}
public List<Question_Template__c > qlistss {get;set;}
public List<Questionnaire_Response__c> rlistss{get;set;}
public Section_Template__c secObj{get;set;}



public QuestionDisplay(Section_Template__c sobj,List<Question_Template__c > ql,List<Questionnaire_Response__c> rl)
{
secObj= new Section_Template__c ();
qlistss =new List<Question_Template__c>();
rlistss= new List<Questionnaire_Response__c>();
this.secObj=sobj;
this.qlistss =ql;
this.rlistss=rl;
}
}//end inner class


public List<QuestionDisplay> getquestionsList()
{
Integer i=0;
listQuestWithOptions= new QuestionDisplay[]{};
accountId=System.currentPageReference().getParameters().get('accId');//to get the school or account id
//System.debug('!!!!!!!!!!!!!!!!~~~~~~~~~~~~~acct id from diff page :'+accountid);
sectionsLists = [Select Id, Name,status__c,Section_label__c,Order_No__c from Section_Template__c];
QuestionResponse=[Select id,Response__c,Question_Template__r.id,Question_Template__r.Question_Label__c,Account_to_Response__c,Questionnaire_Taker_user__c from Questionnaire_Response__c where Account_to_Response__c= :accountId] ;


for(integer w=0;w<sectionsLists.size();w++)
{
List<Question_Template__c > qlists= new List<Question_Template__c>();
List<Questionnaire_Response__c> rlists= new List<Questionnaire_Response__c>();
questionsLists = [SELECT Id,Section_Question__r.id,Question_Label__c,Question_Order_No__c FROM Question_Template__c where Section_Question__r.id=:sectionsLists[w].id order by Question_Order_No__c];

for(integer w1=0;w1<questionsLists.size();w1++)
{
Questionnaire_Response__c resp=new Questionnaire_Response__c();
if((QuestionResponse==null)||(QuestionResponse.size()==0))
{

rlists.add(resp);
qlists.add(questionsLists[w1]);
}
else
{
integer checkflag=0;
for(integer k=0;k<QuestionResponse.size();k++)
{
if(QuestionResponse[k].Question_Template__r.id==questionsLists[w1].id)
{
checkflag=1;resp=QuestionResponse[k];break;
}
}

rlists.add(resp);
qlists.add(questionsLists[w1]);
}

}

//r is reponse list and qlists is question list
listQuestWithOptions.add(new QuestionDisplay(sectionsLists[w],qlists,rlists) );

}


}

 

Visualforce code

I want the response and questions list to iterate alternatively

 

<apex:repeat value="{!questionsList}" var="section">
<apex:variable var="rlists" value="{!section.rlistss}"/>
<apex:pageBlockSection id="subsection" columns="1" title="{!section.secObj.Section_label__c}">
<apex:repeat value="{!section.qlistss}" var="qlist">
<apex:outputField value="{!qlist.Question_Label__c}" />
<apex:outputField value="{!rlists.Response__c}" /> <!-- this fails as i do not know how to iterate both together-->
<br> </br>

</apex:repeat>

 

 

Thanks

  • January 29, 2013
  • Like
  • 0

Hello,

 

I have a visualforce page with partial code below. I want to scroll my page to the outputpanel position when the user clicks the commandLink. I tried using onclick event and setting the focus but it didnt work.

 

<apex:commandLink reRender="questiondetail">
{!section.Section_Label__c}
<apex:param name="sectionId" value="{!section.id}"/>
</apex:commandLink>

--

---

 

<apex:outputPanel id="questiondetail" >

---

</apex:outputPanel>

 

 

Please guide.

thanks

  • January 10, 2013
  • Like
  • 0

All,

 

I have a reuirement in whivh I have 2 tables with different fields.There is a field called "Unit No" in table A which should match with "Catalog No" of table B. So I want to do 3 things:-

1)Do left outer join to get all records of Table A and records of Table B with match on Unit No and Catalog No.

2)Do right outer join to get all records of Table B and records of Table A with match on Unit No and Catalog No.

3)Inner join with matching records from both tables.

 

I tried using IN but than I need Id value for comarison and my Unit No and Catalog No fields are not the name/Id field, they are normal salesforce custom text fields.

 

Any hep is greatly appreciated.

  • August 26, 2013
  • Like
  • 1

All,

 

I have a reuirement in whivh I have 2 tables with different fields.There is a field called "Unit No" in table A which should match with "Catalog No" of table B. So I want to do 3 things:-

1)Do left outer join to get all records of Table A and records of Table B with match on Unit No and Catalog No.

2)Do right outer join to get all records of Table B and records of Table A with match on Unit No and Catalog No.

3)Inner join with matching records from both tables.

 

I tried using IN but than I need Id value for comarison and my Unit No and Catalog No fields are not the name/Id field, they are normal salesforce custom text fields.

 

Any hep is greatly appreciated.

  • August 26, 2013
  • Like
  • 1

Hello,

 

I have 2 queries regarding the salesforce to salesforce inbuilt functionality.

1) So i followed the steps to publish and subscribe fields of object.On the target org the record can be updated by the target user. My requirement is I just want to share specific records but do not want the other org to update any of my records. I am assuming there should be some setting we can do on our profiles but when I read more I found you cannot see the profile of this Connection User.

So is theer a way to set records to read only for Connection uSer only?

 

2)Record level sharing is manual and automatic but I couldnt find a way to autoate the process for specific records. Is there a way to automate shring of specific records and on target automate with some logic to accept it( not auto check as it accepts everything)?

 

Thanks 

 

  • July 30, 2013
  • Like
  • 0

All,

 

I have a requirement in which I have to create a dropdown with option text,picklist and multiselect picklist and depending on what user selects I have to craete those with user inputting the values of each.

 

Seems like a simple thing but I cant create the dependent field. 

 

Thanks

  • July 23, 2013
  • Like
  • 0

Hello,

 

I have a requirement in which I have to upload a pic and get the current location of salesforce user .My current app is not a mobile app.My question is that do I need to create a mobile app or is there some other way to access the fields geolocation and rich text area for pic upload.

If I have to create a mobile app than how can I integrate my current non mobile app or use some of the objects from it  .

 

Thanks.

  • June 24, 2013
  • Like
  • 0

Hello All,

This issue is really bugging me.
I have a visualforce page which is enabled in the force.com site and I have changed the permission set for guest profile to create,edit etc my custom obejct but still I am not seeing the controller class being run from visualforce page.

 

My visualforce page is
<apex:page sidebar="false" showHeader="true" standardStylesheets="false" standardController="Main_questionaire__c" extensions="QuestionnaireFieldsSite" recordSetVar="sitem" id="thePages" >

<apex:form id="templateForm">
<br></br>
<apex:actionFunction name="sectionStatusJS" action="{!sectionStatus}" reRender="buttonPanel"/>

<p style="text-align:center;font-size:18px">Assessment</p>
<apex:outputPanel id="buttonPanel">


<script>
window.onload=function()
{
sectionStatusJS();
setmyFlag(true);
};
</script>
</apex:outputPanel>

<apex:outputPanel rendered="{!myFlag}">
<apex:pageBlock >
<apex:pageBlockSection id="sectionBlock" title="Sections" columns="4">
<apex:repeat value="{!sectionsStatusLists}" var="section">
<apex:commandButton value=" {!section.Section_Template__r.Section_label__c}" style="text-align:center;">
<apex:param name="sectionId" value="{!section.Section_Template__r.id}"/>
<apex:param name="doRerender" value="true" assignTo="{!doRerender}"/>
</apex:commandButton>
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:outputPanel>

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


Apex class THIS CLASS'S IS NEVER CALLED.I SAW THE DEBUG IT DOESNT GET CALLED AT ALL ,NOT EVEN THE CONSTRUCTORS DEBUG STATEMENT

public with sharing class QuestionnaireFieldsSite
{

public List<Section_Template__c > sectionsLists{ get; set; }
public List<Main_questionaire__c> templateLists { get; set; }
public List<SectionStatus__c > sectionsStatusLists{ get; set; }

static integer ltoggle=0;
public Transient Boolean doRerender;
public Boolean getdoRerender(){return doRerender;}

public Boolean myFlag{get; set;}
public void setmyFlag(Boolean flags)
{this.myFlag=flags;}

public void setdoRerender(Boolean doRerender)
{
this.doRerender = doRerender;
System.debug('doRerender should be set here to true: doRerender = '+this.doRerender);
}

public QuestionnaireFieldsSite(ApexPages.StandardSetController controller) {
refreshPagePart=false; System.debug('----------initialized in sectionstatus'+myFlag);
}
public QuestionnaireFieldsSite(){System.debug('-2---------initialized in sectionstatus'+myFlag);}

public void
{myFlag=false;
theToggleVal =false;System.debug('----------initialized in sectionstatus'+myFlag);
if (!myFlag)
{
SectionStatus__c[] StatusLists=new SectionStatus__c[]{};
accountId=System.currentPageReference().getParameters().get('accId');

templateLists = [Select Id, Name from Main_questionaire__c limit 1];
if(templateLists!=NULL && templateLists.size()>=1)
{
templateName = templateLists.get(0).Name;
sectionsLists = [Select Id, Name,status__c,Section_label__c,Order_No__c from Section_Template__c where Questionnaire_Section__c=:templateLists.get(0).Id order by Order_No__c];
SectionStatus__c[] userSectionStatus=[Select id,Section_Template__c,Status__c,User__c,Account_to_SectionStatus__c from SectionStatus__c where Account_to_SectionStatus__c= :accountId] ;
if((userSectionStatus==null)||(userSectionStatus.size()==0))
{
System.debug('~~~~~~~~~~~~~COMES IN SECTION STATUS');
for(Section_Template__c res: sectionsLists )
{

SectionStatus__c stat=new SectionStatus__c();
stat.User__c=UserInfo.getUserId();

System.debug('~~~~~~~~~~~~~default controller------'+stat);
StatusLists.add(stat);

}
try
{
upsert StatusLists;
}
catch(DmlException e){System.debug('~~~~~~~~~~~~~EXCEPTION --'+e);}
}

}

}
sectionsStatusLists=[Select id,Section_Template__c,Section_Template__r.id,Section_Template__r.Section_Label__c from SectionStatus__c where Section_Template__c!=null ] ;

} myFlag=true;}
}

 

Please help.

Hello,

 

I have a visualforce page below which displays part of the data but skips the response.

Belo is the code

 

<apex:page sidebar="false" standardStylesheets="true" Controller="QuestionnaireFieldsReport" renderAs="pdf">
<apex:panelGrid columns="1" id="theGrid" title="{!templateName}">
<apex:repeat value="{!Sections}" var="sec" >
<br/>
<!-- display section -->
<apex:panelGrid columns="2" title="{!sec.section.Section_label__c}">
<br/>
<apex:repeat value="{!sec.questions}" var="q" >
<!-- display questions -->
<apex:outputField value="{!q.Question_Label__c}" /> <br/>


<!-- display answer  BELOW TEXT IS NOT DISPLAYED-->
<apex:outputText value="{!sec.response[q.Id].Response__c}" rendered={!IF(NOT(ISNULL(sec.response[q.Id])),'true','false')}" /> 
</apex:repeat>

</apex:panelGrid>

</apex:page>

 

Thanks

 

  • March 01, 2013
  • Like
  • 0

Hello,

 

Is there a way to retrieve list of dashboards from a folder.The way reports can be retrieved using 

 

folder[] ff = [select id,name from folder where name = 'DOI BI Reports'];
id fid = (ff.isEmpty()) ? null : ff[0].id;
List<Report>  listReports = [select id, name from report where ownerid = : fid];

 

I do not want to use id directly as it chnages when we deploy to a new instance.

 

 

Thanks

  • February 07, 2013
  • Like
  • 0

How is this done in VF?  I can't do it above the apex:page tag, nor can I do it inside it.  We want valid XHTML on our pages, and are having a hard time even getting this simple declaration to work.