• harshasfdc
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 22
    Replies
Hi,

My client has force.com app subscription license  for 60 of his users. we got a new requirement to customize the system as per business. as a part of customization if i write vf pages and controller can i give permission on profile whith force.com app subscription license ?.do i have any limitations?.
Thanks,
Harsha
Hi All,

i have a tried using offset and standardsetcontroller  but i am getting 2000 limit execption for Offset and 10000 for Standardset controller .How to over come this issue .



Thanks,
Harsha

Hi All,

 

I have a 5 users with same profile . They are able to login from ipad and iphone but they are unable to login from desktop. I have checked in profile for IP address restrictions but I don't have any kind of restrictions.Please help me out.

 

Thanks,

Harsha

Hi All,

 

 

I am generating a pdf   for contact  for this i have created vf page and i need to show up the images from attachments every thing is working fine but image break simbol is appearing if their is no image assoiated with the record in attachments .so how can i resolwve this issue

 

 

Thanks,

Harsha

Hi,

 

I am trying to make column heder freezed on scrolling the data is this possible to do ??

 

 

Thanks,

Harsha

Hi All,

 

I am trying to get test coverage for wrapper class bu i am getting Constructor not defined: [pde5beghou.wrap].<Constructor>()

 

here is my code can any one help me out 

 

public class OppClass
{
//for pde5trx-adcvs.rev
public integer revnrx{get;set;}
public integer adcnrx{get;set;}
public integer silnrx{get;set;}
public decimal nrxcal{get;set;}
public decimal nrxadc{get;set;}
public decimal nrxrev{get;set;}
public decimal nrxsil{get;set;}
public String d{get;set;}
public string n{get;set;}
public string o{get;set;}
public string p{get;set;}

public decimal aridica{get;set;}
public decimal revatio{get;set;}
public decimal SILDENAFIL{get;set;}
public string a{get;set;}
public string b{get;set;}
public string c{get;set;}
//for date
public string dt{get;set;}
//for pde5trx-adctrx graph
public decimal pde5trxtotal{get;set;}

//forPDE5TRx-Adc vs. Rev Market Share
public decimal peraridica {get;set;}
public decimal perrevatio{get;set;}
public decimal perSILDENAFIL {get;set;}

list<AggregateResult >ar=new list<AggregateResult>();
public oppclass(AggregateResult ar)

{
aridica=integer.valueOf(ar.get('a1'));
revatio=integer.valueof(ar.get('a2'));
SILDENAFIL=integer.valueof(ar.get('a3'));

Datetime dd=Date.valueof(ar.get('s2'));

dt= dd.format('MM/dd/yyyy') ;
pde5trxtotal=(aridica+revatio+SILDENAFIL)+0.5;

peraridica= math.round(aridica*100/pde5trxtotal);
perrevatio=math.round(revatio*100/pde5trxtotal);
perSILDENAFIL=math.round(SILDENAFIL*100/pde5trxtotal);

a=string.valueof(peraridica+'%');
b=string.valueof(perrevatio+'%');
c=string.valueof(perSILDENAFIL+'%');

adcnrx=integer.valueof(ar.get('na1'));
revnrx=integer.valueof(ar.get('na2'));
silnrx=integer.valueof(ar.get('na3'));

 

nrxcal=(adcnrx+revnrx+silnrx)+0.5;
nrxadc=math.round(adcnrx*100/nrxcal);
nrxrev=math.round(revnrx*100/nrxcal);
nrxsil=math.round(silnrx*100/nrxcal);
n=string.valueof(nrxadc+'%');
o=string.valueof(nrxrev+'%');
p=string.valueof(nrxsil+'%');
}


}

 

Thanks,

Harsha

Hi All,

 

i am displaying data using pageblocktable. i just want to add comma to column values which are displaying  how can i achive this .

 

Thanks,

Harsha

Hi All,

 

i want to format the date in a column in pageblock table which is being retrived from aggrigate result .i am getting the result as "2009-06-30 00:00:00" i just want to show only date"2009-06-30" insed of time.is their any way to this 

 

Thanks,

Harsha

Hi All,

 

I am trying to use group by function in soql query without using aggregate function  it is showing error is it possible to use group by function without  aggregate the values??

 

 

Thanks

Harsha

Hi all

 

 

I have a requirement to filter data in page block table by selecting the value  from picklist  .

 

 

Thanks,

Harsha 

 

 

Hi All,

 

 

I am trying to insert data using data loader from  production to sandbox  i have exported the data and while mapping the fields the data loader is not showing the formula fields which are in sobject .can any one help how to insert data into formula fields 

 

 

Thanks,

Harsha

Hi,

 

can we use territory managaement for custom objects it is given in pdf that 

 

Territory management only affects accounts and the standard objects that have a master-detail relationship to accounts. For example, opportunities are included in territory management but leads are not.

 

Thanks,

Harsha

Hi All,

 

i have a requirement can we use territory management for custom objects .

 

Thanks,

Harsha 

Hi All,

 

I have a require ment i have to generate the pdf file after performing some calculations where we perform calculations for static values .i want to save this as a pdf after performing the operation is this possible .please help in this.

 

Thanks,

Harsha

Hi All,

 

iam trying to use rerender functonality but iam un able to plot the values in graph here is the code can any one help me out

 

<apex:page controller="calchart" sidebar="false">
<apex:includeScript value="{!$Resource.jquery}"/>
<apex:includeScript value="{!$Resource.Exporting}"/>
<apex:includeScript value="{!$Resource.highcharts}"/>
<script type="text/javascript">
$(function () {
var chart;

var chart;

var datapointx= new Array();

//alert('{!vale}');
var xAxis = '{!vale}';



var datapointy= new Array();

// alert('{!valee}');
var yAxis = '{!valee}';






$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line',
marginRight: 50,
marginBottom: 25
},
title: {
text: 'True Start Goal Attainment ',
x: -20 //center
},
xAxis: {

plotLines: [{
value: datapointx,
color: '#003296',
width: 3,
value: datapointx,
zIndex: 3,
dashStyle: 'longdashdot'
}]

},
yAxis: {

title: {
text: 'Pay out'
},
plotLines: [{
value: datapointy,
width: 3,
color: '#003296',
dashStyle: 'longdashdot'
}]
},
tooltip: {
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+
this.x +'%'+': '+ this.y +'$';
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: [{
name: 'Tokyo',
data: [[25,0],[75,4000],[100,9000],[140,21000],[200,33000]]
},
{
name: 'SSSS',
data:[datapointx,datapointy]
}]
});
});

});
</script>
<apex:form >

<apex:actionfunction action="{!result}" rerender="pb" name="ss"/>
<apex:pageblock id="pb" title="CPS Incentive Compensation What-If Calculator" >

<apex:pageblockSection columns="1" title="Enter This information for your own territory">
<apex:image value="{$resource.myimage}" />
<apex:inputtext value="{!Territorys}" />
<apex:inputtext value="{!Territorysg}" />
<apex:inputtext value="{!Territorydcs}" />
<apex:inputtext value="{!Regionals}" />
<apex:inputtext value="{!RegionalSGoal}" />
</apex:pageblockSection>
<apex:pageblockButtons location="bottom">
<apex:commandButton value="getresult" onclick="ss();return false;"/>
</apex:pageblockButtons>

<apex:pageblocksection title="expected" columns="1">
<apex:outputText value="{!a}" ></apex:outputText>
<apex:outputtext value="{!b}" ></apex:outputtext>
<apex:outputtext value="{!attainment}" />
<apex:outputtext value="{!rslt }" ></apex:outputtext>
</apex:pageblocksection>
<apex:pageblocksection title="exp" columns="1">

<apex:outputtext value="{!amnt}" ></apex:outputtext>
<apex:outputText value="{!a}" ></apex:outputText>
<apex:outputtext value="{!c}" ></apex:outputtext>
<apex:outputtext value="{!netstart}" />
<apex:outputText value="{!patientre}" ></apex:outputText>

</apex:pageblocksection>
<apex:pageblocksection title="result" columns="1" >
<apex:outputtext value="{!amnt}" ></apex:outputtext>
<apex:outputtext value="{!d}" ></apex:outputtext>
<apex:outputtext value="{!e}" ></apex:outputtext>
<apex:outputtext value="{!rgattainment}" />
<apex:outputtext value="{!finalval}" />
</apex:pageblocksection>
</apex:pageblock>
<apexoutputPanel id="go" >

<div id="container" style="width: 500px; height: 400px; margin: 0 auto"></div>

</apexoutputPanel>

</apex:form>


</apex:page>

***************************************
public class calchart{

public String rest { get; set; }
//output val
public decimal e { get; set; }

public decimal d { get; set; }

public decimal c { get; set; }

public decimal b { get; set; }

public decimal a { get; set; }


public string alrt {get;set;}
//input val

public decimal RegionalSGoal { get; set; }

public decimal Regionals { get; set; }

public decimal Territorydcs { get; set; }

public decimal Territorysg { get; set; }

public decimal Territorys { get; set; }

public list<integer> vale {get;set;}

public list<integer> valee {get;set;}
//reslut val

public decimal attainment {get;set;}
public decimal rslt{get;set;}
public decimal netstart{get;set;}
public string amnt{get;set;}
public decimal patientre{get;set;}
public decimal Regionalatt{get;set;}
public decimal rgattainment{get;set;}
public decimal finalval{get;set;}


public PageReference result()

{
a=Territorys ;
b=Territorysg ;
c=Territorydcs;
d=Regionals ;
e=RegionalSGoal ;

if(a==null)
{
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,'Please enter value'));
return null;
}
//attainment
if(Territorysg <>0)
{
attainment= (Territorys/Territorysg)*100 ;
}
else{
attainment=0;
}

system.debug('----'+attainment);
if(attainment<(75))
{

rslt=0;
}
else
{
if(attainment<=100)
{
rslt = (4000 + ((attainment-75)/100*(100*200)));
}
else
{
if(attainment <=140)
{
rslt=(9000+((attainment-100)/100)*(100*300));
}
else
{
rslt=(21000+((attainment-140)/100)*(100*200));
}
}
}

//Net start

netstart=Territorys-Territorydcs;

if(attainment>=50/100)
{
amnt='yes';
}
else{
amnt='no';
}

if(amnt=='yes'&& netstart>0)
{
patientre=(netstart*500);
}

if(RegionalSGoal>0)
{
rgattainment=(Regionals /RegionalSGoal)*100;
}

if(amnt=='yes')
{
if(rgattainment<75)
{
finalval=0;
}
else
{
if(rgattainment<=100)
{
finalval=(2375+((rgattainment-75)/100*(100*25)));
}
else
{
IF(rgattainment<140)
{
finalval=(3000+((rgattainment-100)/100*(100*50 )));
}
else
{
finalval=(5000+((rgattainment-140)/100*(100*25)));
}
}
}

}
else
{
finalval=0;
}
vale=new list<integer>();

vale.add(integer.valueof(attainment));

system.debug('---------'+vale);
valee=new list<integer>();

valee.add(integer.valueof(rslt));
//attainment=vale;
//rslt=valee;
return null;
}
}

Hi All

 

I have to tabs 1 tab is to show dashboards another tab is to display the records in a pageblock .but iam un able to select the 2nd tab 

 

in my first tab i have a script is that the reason .

 

 

awaiting for u r response 

 

 

Thanks 

Harsha

Hi All,

 

iam trying to retrive the data from 2 sobjects using soql qury and trying to show in vf page but the records in child object are displayed here is the apex code 

 

public class veepage2
{
public string ss{get;set;}
list<Physician__c>ph=new list<Physician__C>();

public list<Physician__c>getme()
{
ph=[select id,LastName__c,FirstName__c , PhysicianProd__r.PatientsOT3Mon__c,PhysicianProd__r.DCs12WeeksInd__c,PhysicianProd__r.LowConversionRateInd__c,PhysicianProd__r.NonTitratedPatientsInd__c,PhysicianProd__r.PotentialSwitchesInd__c,PhysicianProd__r.HighDCsDeathAEInd__C,PhysicianProd__r.Week8WriteInd__c,PhysicianProd__r.Week12ClaimsInd__c from Physician__C where PhysicianId__c='9900000300336'];
return p;
}
}

********************************************

<apex:page controller="veepage2" >
<apex:form >
<apex:pageBlock >
<apex:pageblocktable value="{!me}" var="m">

<apex:column value="{!m.LastName__c}"/>
<apex:column value="{!m.FirstName__c}"/>
<apex:column value="{!m.PhysicianProd__r.PatientsOT3Mon__c}"/>
<apex:column value="{!m.PhysicianProd__r.DCs12WeeksInd__c }"/>
<apex:column value="{!m.physicianprod__r.LowConversionRateInd__c}"/>
<apex:column value="{!m.physicianprod__r.NonTitratedPatientsInd__c}"/>
<apex:column value="{!m.physicianprod__r.NonTitratedPatientsInd__c}"/>
<apex:column value="{!m.physicianprod__r.PotentialSwitchesInd__c}"/>
<apex:column value="{!m.PhysicianProd__r.HighDCsDeathAEInd__c}"/>
<apex:column value="{!m.PhysicianProd__r.Week8WriteInd__c}"/>
<apex:column value="{!m.PhysicianProd__r.Week12ClaimsInd__c}"/>
</apex:pageblocktable>
</apex:pageBlock>
</apex:form>
</apex:page>

Hi All,

 

Is this possibel to show different pageblocktables on selecting a value in selectlist .i have to groups groupa and groupb on selecting groupa i have to display one pageblocktable corrsponding to groupa on selecting gropub  i have to show groupb value in the same page.

 

Thanks,

Harsha

Hi All,

 

can we query 2 sobjects in a single soql query.please help me out

 

 

Thanks 

Harsha

Hi All,

 

is this possible to create a view using soql query for 2 s objects

 

Thanks

Harsha

I have this VF page:
<apex:page controller="page1Cont" docType="html-5.0">
<apex:form >
<apex:input type="date" value="{!myDate}" />
</apex:form>
</apex:page>
In chrome I get a datepicker gadget, but not in firefox. Is there any way to get the picker on firefox as well?

chrome:

User-added image

firefox:
User-added image

  • June 13, 2014
  • Like
  • 0

Can anyone help.

If i am doing an operation of inserting some values in an object using a loop.

Account a=new Account();
for(Integer j=0;j<5;j++)
 {
 a.put(l[j],inputvalues[j]);
 }  
Here inputvalues and l array contains the following values:
l[j]                inputvalues[j]
Name                 Neha 
Accountnumber        5023   

If suppose there occurs some error during "put" operation then i get the error in Visual Force page
Instead of this i want an error in some other resource like a variable or list item and my operation of insert should not stop.
Anyone has a solution to this.
Please help with some sample code.

 

Thanks.

I'm using the standardSetController to implement pagination in a VF page.  In my controller I have a property totalPages that returns an integer.  The problem is that the value is not rounding up.  For example, if I have a resultSize of 200 and a pageSize of 5, the totalPages should be 40.  If I have a resultSize of 7 and pageSize of 5, the totalPages should be 2.

 

I've been digging thru the math methods trying to get the value to round up correctly.

 

I've tried the following:

 

 

Decimal totalPages = Decimal.valueOf(setCtrl.getResultSize() / setCtrl.getPageSize()).round(RoundingMode.UP);
			return totalPages.intValue();

 It is not rounding up.  Can anyone help with how I can get my totalPages to round up correctly?

 

Thanks for any help.

HI please help me on this...

 

Public void populateSharingItems(Order_Line_Item__c oli){
                String CPQItem='';
                if(oli.CPQItem__c.contains('.'))
                    CPQItem =  oli.CPQItem__c.substring(0,oli.CPQItem__c.indexOf('.'));
                sharedServPathIdSet.add(oli.Parent_Path_Instance_ID__c);
                sharedServPathIdSet.add(oli.Path_Instance_Id__c);

                if(sharingPathNParentPathMap.containsKey(oli.Path_Instance_Id__c))
                    sharingPathNParentPathMap.get(oli.Path_Instance_Id__c).add(oli.Parent_Path_Instance_ID__c);
                else{
                    Set<String> parentPathIdSet = new Set<String>();
                    parentPathIdSet.add(oli.Parent_Path_Instance_ID__c);
                    sharingPathNParentPathMap.put(oli.Path_Instance_Id__c, parentPathIdSet);
                }
                if (mainParentOliMap.containsKey(oli.ParentOrder__c+'-'+CPQItem)){
                    Order_Line_Item__c mainOli = mainParentOliMap.get(oli.ParentOrder__c+'-'+CPQItem);
                    String mainParentServiceId='';
                    if(mainOli.Path_Instance_Id__c != null)
                        mainParentServiceId = mainOli.Master_Service_ID__c!=null ? mainOli.Master_Service_ID__c: mainOli.Primary_Service_ID__c;
                    else if(iplMainParentMap.containsKey(mainOli.id))
                        mainParentServiceId = iplMainParentMap.get(mainOli.id).Master_Service_ID__c!=null ? iplMainParentMap.get(mainOli.id).Master_Service_ID__c : iplMainParentMap.get(mainOli.id).Primary_Service_ID__c;

                    if(mainParentServiceId != '')
                        sharingPathNMainParentPathMap.put(oli.Path_Instance_Id__c+'-'+oli.Parent_Path_Instance_ID__c, mainParentServiceId);
                }
    }

 

Hi All,

 

my organization want to use salesforcce data without any insert,update the salesforce data using webservice,I am totally new to web service,I hope enterprise wsdl is fine or i have to create custom web service.

  • April 03, 2013
  • Like
  • 0

Dear friends,

 

I need your urgent help on the following problem that i am currently facing. You help is greatly appreciated. 

 

At present i am not able to plot more than 2 values (lines) for a LINE GRAPH while generating a report. I need to know how to do so. Maybe i do not know how to do it or maybe salesforce does not provide the funtionality.

 

In any case, can you please tell me how to achieve that? If not is there a work around? (It has to be a line graph)

 

Many Thanks in advance.

please any one tell the process of moving app sandbox to producction?  and how to create sandbox and production and change sets ?

Hi All,

 

I am trying to get test coverage for wrapper class bu i am getting Constructor not defined: [pde5beghou.wrap].<Constructor>()

 

here is my code can any one help me out 

 

public class OppClass
{
//for pde5trx-adcvs.rev
public integer revnrx{get;set;}
public integer adcnrx{get;set;}
public integer silnrx{get;set;}
public decimal nrxcal{get;set;}
public decimal nrxadc{get;set;}
public decimal nrxrev{get;set;}
public decimal nrxsil{get;set;}
public String d{get;set;}
public string n{get;set;}
public string o{get;set;}
public string p{get;set;}

public decimal aridica{get;set;}
public decimal revatio{get;set;}
public decimal SILDENAFIL{get;set;}
public string a{get;set;}
public string b{get;set;}
public string c{get;set;}
//for date
public string dt{get;set;}
//for pde5trx-adctrx graph
public decimal pde5trxtotal{get;set;}

//forPDE5TRx-Adc vs. Rev Market Share
public decimal peraridica {get;set;}
public decimal perrevatio{get;set;}
public decimal perSILDENAFIL {get;set;}

list<AggregateResult >ar=new list<AggregateResult>();
public oppclass(AggregateResult ar)

{
aridica=integer.valueOf(ar.get('a1'));
revatio=integer.valueof(ar.get('a2'));
SILDENAFIL=integer.valueof(ar.get('a3'));

Datetime dd=Date.valueof(ar.get('s2'));

dt= dd.format('MM/dd/yyyy') ;
pde5trxtotal=(aridica+revatio+SILDENAFIL)+0.5;

peraridica= math.round(aridica*100/pde5trxtotal);
perrevatio=math.round(revatio*100/pde5trxtotal);
perSILDENAFIL=math.round(SILDENAFIL*100/pde5trxtotal);

a=string.valueof(peraridica+'%');
b=string.valueof(perrevatio+'%');
c=string.valueof(perSILDENAFIL+'%');

adcnrx=integer.valueof(ar.get('na1'));
revnrx=integer.valueof(ar.get('na2'));
silnrx=integer.valueof(ar.get('na3'));

 

nrxcal=(adcnrx+revnrx+silnrx)+0.5;
nrxadc=math.round(adcnrx*100/nrxcal);
nrxrev=math.round(revnrx*100/nrxcal);
nrxsil=math.round(silnrx*100/nrxcal);
n=string.valueof(nrxadc+'%');
o=string.valueof(nrxrev+'%');
p=string.valueof(nrxsil+'%');
}


}

 

Thanks,

Harsha

Hi All,

 

i am displaying data using pageblocktable. i just want to add comma to column values which are displaying  how can i achive this .

 

Thanks,

Harsha

HI everyone,

 

My requirement is dispalying percentage(%) marks. I done my requirement but in percentage field it display like 60.89% but it dispalys after record saved like 6089.00%. Any one can solve this problem.

 

i taken one formula field that is Percentage__c in thhis field i want to display Percentage of the semester.

Already i created one read ony filed is TotalMArks__C.

 

My formula Expression code is :

 

Total_Marks__c / 7

 

Any one can please help this one...

 

Thanks for your helping...............

Hi,

 

can we use territory managaement for custom objects it is given in pdf that 

 

Territory management only affects accounts and the standard objects that have a master-detail relationship to accounts. For example, opportunities are included in territory management but leads are not.

 

Thanks,

Harsha

Hello,

 

A site page is accessed by Guest User with Guest Profile and a Guest User wants to perform update operation on Standard Object (Campaign, Contact, Campaign Member).

 

Will that be possible using Guest Profile? If not then what would be the workaround?

 

Thanks,
Devendra

hi,

 

vl javascript work on pageblocksectionitems , i added validations for it, but it is not working ,...dis my code , ican u plz provide solution for this 

 

<apex:pageBlockSection title="Nonprofit Organization"
columns="2" id="pbset3">
<apex:pageBlockSectionItem >
<Label>Organization's Name</Label>
<apex:inputfield styleclass="textboxred" id="orgName"
onkeyup="textLimit('{!$Component.OrgName}',80);"
style="width:200px;" value="{!Actinterest.Name}" />
</apex:pageBlockSectionItem>

</apex:pageBlockSection>

 <apex:commandButton styleclass="submit" value="Submit" onclick="return checkvalidity('{!$Component.orgName}');"

 action="{!save}" />

 

 

 

 

<script language="javascript" type="text/javascript">
function checkvalidity()
{

if(document.getElementById("{!$Component.orgName}").value == ' ')
{
alert('please enter organization name');
return false;
}

else{
return true;

}
}
</script>


Hi All,

 

iam trying to retrive the data from 2 sobjects using soql qury and trying to show in vf page but the records in child object are displayed here is the apex code 

 

public class veepage2
{
public string ss{get;set;}
list<Physician__c>ph=new list<Physician__C>();

public list<Physician__c>getme()
{
ph=[select id,LastName__c,FirstName__c , PhysicianProd__r.PatientsOT3Mon__c,PhysicianProd__r.DCs12WeeksInd__c,PhysicianProd__r.LowConversionRateInd__c,PhysicianProd__r.NonTitratedPatientsInd__c,PhysicianProd__r.PotentialSwitchesInd__c,PhysicianProd__r.HighDCsDeathAEInd__C,PhysicianProd__r.Week8WriteInd__c,PhysicianProd__r.Week12ClaimsInd__c from Physician__C where PhysicianId__c='9900000300336'];
return p;
}
}

********************************************

<apex:page controller="veepage2" >
<apex:form >
<apex:pageBlock >
<apex:pageblocktable value="{!me}" var="m">

<apex:column value="{!m.LastName__c}"/>
<apex:column value="{!m.FirstName__c}"/>
<apex:column value="{!m.PhysicianProd__r.PatientsOT3Mon__c}"/>
<apex:column value="{!m.PhysicianProd__r.DCs12WeeksInd__c }"/>
<apex:column value="{!m.physicianprod__r.LowConversionRateInd__c}"/>
<apex:column value="{!m.physicianprod__r.NonTitratedPatientsInd__c}"/>
<apex:column value="{!m.physicianprod__r.NonTitratedPatientsInd__c}"/>
<apex:column value="{!m.physicianprod__r.PotentialSwitchesInd__c}"/>
<apex:column value="{!m.PhysicianProd__r.HighDCsDeathAEInd__c}"/>
<apex:column value="{!m.PhysicianProd__r.Week8WriteInd__c}"/>
<apex:column value="{!m.PhysicianProd__r.Week12ClaimsInd__c}"/>
</apex:pageblocktable>
</apex:pageBlock>
</apex:form>
</apex:page>

Hi All,

 

Is this possibel to show different pageblocktables on selecting a value in selectlist .i have to groups groupa and groupb on selecting groupa i have to display one pageblocktable corrsponding to groupa on selecting gropub  i have to show groupb value in the same page.

 

Thanks,

Harsha

Hi All,

 

can we query 2 sobjects in a single soql query.please help me out

 

 

Thanks 

Harsha

I am using the aggregatere result function to a second, dependant picklist and am trying to assign the second picklist to the recorrd. I am trying to attach the aggregated result value to a mapping value.

 

Here is the error message:

System.SObjectException: Invalid field CampaignName__c for AggregateResult

Class.CampaignListOwner7.getcampaignlists: line 61, column 35 External entry point 

Class code:

 

public with sharing class CampaignListOwner7{
List<SelectOption> selectedOwnerList = new List<SelectOption>();
Map<id, String> mappingval = new Map<id, String>();
Map<id, String> mappingcval = new Map<id, String>();
public String selectedval { get;  set;}
public String selectedcval { get;  set;}
public String cval { get;  set;}

    public CampaignListOwner7(ApexPages.StandardController controller) {

    }
    public String getCampaign() {
        return this.Campaign;
    }
    public String getCampaignStatus() {
        return this.CampaignStatus;
    }    

    public string s;
    public String campaign;
    public string campaignstatus;
    public transient string               Campaignid{ get; set;}
    private transient CampaignMember[]    members; //the members for that campaign
    public transient String               owner; //owner ID

    public string getOwner() {
        return this.owner;
    }    
    public void setOwner(String s) {
 this.Owner = s; }


  public List<CampaignMember> CampaignMember { get;  set;}
 
    public List<SelectOption> getselectedOwner(){
         List<SelectOption> optionList = new List<SelectOption>();
            optionList.add(new SelectOption( '1', 'SELECT' ));
            for(User u:[select id,name from user where id in (select ownername__c from campaignmember) order by name]) {
            optionList.add(new SelectOption(u.id, u.name));
            mappingval.put(u.id, u.name);
        }
            return optionList;
        }
        
    public List <SelectOption> getcampaignlists(){
            
system.debug('SFDC TEST ************ OWNER' + Owner);
            
        AggregateResult[]groupedResults = [select Campaign_Name__c from campaignmember where
                 ownername__c=:selectedval group by Campaign_Name__c];
        
        List <SelectOption> optionList = new list<SelectOption>();
        
        optionList.add(new SelectOption( '1', 'SELECT' ));
        system.debug('SFDC TEST *************' + selectedVal);

        if(selectedval!= null){
    for(Aggregateresult ar :groupedResults) {
            optionList.add(new SelectOption(String.valueof( ar.get('Campaign_Name__c')), String.valueof(ar.get('Campaign_Name__c'))));
            String aID = (string)ar.get('Campaign_Name__c');
            String abID = (string)ar.get('CampaignName__c');
            mappingcval.put(abID, aID);
            }
        }
                
        return optionList;
            
    }
        
    public PageReference campaignRefresh() {       
              system.debug('$$$$$:'+selectedval);
            
              system.debug(mappingval.get(selectedval));
               try {
                if(selectedval != null) {
                    CampaignMember = [select Id, owner_Name__c, CurrencyIsoCode, status from
                        Campaignmember where owner_Name__c =: mappingval.get(selectedval)limit 99];
                    }else
                    
                    CampaignMember = [select Id, owner_Name__c, Campaign_Name__c, status, CurrencyIsoCode from
                        Campaignmember where owner_Name__c =: mappingval.get(selectedval) 
                        and Campaign_Name__c =: mappingcval.get(selectedcval) limit 99];
                    
               }catch( Exception e ){
                ApexPages.addMessages( e );
            }     
 
             system.debug('##################' + CampaignMember);
             return null;
    }
}

 

How do I put the aggregate result to the mappingcval?

 

Thank you