• sunitha
  • NEWBIE
  • 25 Points
  • Member since 2013

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

  hi,

   plz any one clear my doubt

    is it possible to write 1000 values in dependent pick list?

  for example

i have 2 picklists.contrty is controlling pickist and state isdependent pick .i am having 100 countries and each country is having 10 sates .so here total 1000  values for state pick list .

 

 

 

 

 

  • September 10, 2013
  • Like
  • 0

 Hi all,

  plz clear my doubt

 

 

I have trigger of 36% coverage and class of 69% will it be movable into production?

 

hi, here Iam trying to implement some apex code for display dashdoard
 through vf pages. while compiling the apex class i got the error unexpected token

 

 

here iam attaching apex class code and vf page code. please any one can clear this error

 

 

public class OppsController {
publicApexPages.StandardSetControllersetCon{
get {
if(setCon == null) {
setCon = newApexPages.StandardSetController(Database.getQueryLocator(
                      [SELECT name, type, amount, closedate FROM Opportunity]));
setCon.setPageSize(5);
            }
returnsetCon;
        }
set;
    }

public List<Opportunity>getOpportunities() {
return (List<Opportunity>) setCon.getRecords();
    }
}

 

 

 

vf page code

   

<apex:page controller="OppsController">

<apex:chart data="{!Opportunities}" width="600" height="400">

<apex:axis type="Category" position="left" fields="Name" title="Opportunities"/>

<apex:axis type="Numeric" position="bottom" fields="Amount" title="Amount"/>

<apex:barSeries orientation="horizontal" axis="bottom"xField="Name"yField="Amount"/>

</apex:chart>

<apex:dataTable value="{!Opportunities}"var="opp">

<apex:column value="{!opp.name}"/>

<apex:column value="{!opp.amount}"/>

</apex:dataTable>

</apex:page>

 

 

 

Hi, 

iam planing to write dev 401 certification .

is it possible to write online exam on laptab

Hi All,

 

I am getting the below error  in class while developing visualforcepage for   page reference. Please correct me 

 

 

System.QueryException: List has no rows for assignment to SObject 

 

Class.MyCustomController.<init>: line 4, column

 

visualforce page code:

<apex:page controller="MyCustomController" tabStyle="Account" >
<apex:form >
<apex:pageBlock title="Accountdetails">
<apex:pageBlockSection title="AccountInformation" collapsible="true">
<apex:inputfield value="{!Account.Name}"/>
<apex:inputfield value="{!Account.Phone}"/>
<apex:inputfield value="{!Account.Industry}"/>
<apex:inputfield value="{!Account.Rating}"/>
<apex:inputfield value="{!Account.Website}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Accountdetails" collapsible="true">
<apex:inputfield value="{!Account.BillingCity}"/>
<apex:inputfield value="{!Account.billingCountry}"/>
<apex:inputfield value="{!Account.Shippingcity}"/>
<apex:inputfield value="{!Account.shippingCountry}"/>
<apex:inputfield value="{!Account.Annualrevenue}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

class

 

 

public class MyCustomController {
public Account acc;
public MyCustomController(){
acc=[select name,id,phone,industry,website,rating,BillingCity,BillingCountry,
ShippingCity,ShippingCountry,AnnualRevenue from Account where id=:Apexpages.currentPage().getParameters().get('id')];

}
public Account getAccount() {
return acc;
}
public PageReference saveMethod()
{
update acc;
PageReference pf=new apexPages.StandardController(acc).view();
return pf;
}
}

 

Hi All,

 

I am getting the below error while saving the trigger. Please correct me 

Error: Compile Error: Entity is not org-accessible at line 1 column 1

 

trigger salesContacts on Opportunity (after insert){

List<OpportunityShare> sharesToCreate = new List<OpportunityShare>();

            List<OpportunityTeamMember> oppteam = new List<OpportunityTeamMember> ();

           

                if(trigger.new[0].Partner_User__c != null) {

                   OpportunityShare oshare = new OpportunityShare();

                    oshare.OpportunityAccessLevel = 'Edit';

                    oshare.OpportunityId = trigger.new[0].Id;

                    oshare.UserOrGroupId = trigger.new[0].Partner_User__c;

                    sharesToCreate.add(oshare);

                   

                   OpportunityTeamMember ot = new OpportunityTeamMember();

                    ot.OpportunityId = trigger.new[0].Id;

                    ot.UserId = trigger.new[0].Partner_User__c;

                    ot.TeamMemberRole = 'Reseller';

                    oppteam.add(ot);  

               }

               

               

                // do the DML to create shares

                if (!sharesToCreate.isEmpty())

                   insert sharesToCreate;  

               

                // do the DML to create shares

                if (!oppteam.isEmpty())

                   insert oppteam;

}

 

hi could u give the soluti

trigger salesContacts on Opportunity (after insert){
List<OpportunityShare> sharesToCreate = new List<OpportunityShare>();
List<OpportunityTeamMember> oppteam = new List<OpportunityTeamMember> ();

if(trigger.new[0].Partner_User__c != null) {
OpportunityShare oshare = new OpportunityShare();
oshare.OpportunityAccessLevel = 'Edit';
oshare.OpportunityId = trigger.new[0].Id;
oshare.UserOrGroupId = trigger.new[0].Partner_User__c;
sharesToCreate.add(oshare);

OpportunityTeamMember ot = new OpportunityTeamMember();
ot.OpportunityId = trigger.new[0].Id;
ot.UserId = trigger.new[0].Partner_User__c;
ot.TeamMemberRole = 'Reseller';
oppteam.add(ot);
}


// do the DML to create shares
if (!sharesToCreate.isEmpty())
insert sharesToCreate;

// do the DML to create shares
if (!oppteam.isEmpty())
insert oppteam;
}

on for above error given the code below

 

hi, here Iam trying to implement some apex code for display dashdoard
 through vf pages. while compiling the apex class i got the error unexpected token

 

 

here iam attaching apex class code and vf page code. please any one can clear this error

 

 

public class OppsController {
publicApexPages.StandardSetControllersetCon{
get {
if(setCon == null) {
setCon = newApexPages.StandardSetController(Database.getQueryLocator(
                      [SELECT name, type, amount, closedate FROM Opportunity]));
setCon.setPageSize(5);
            }
returnsetCon;
        }
set;
    }

public List<Opportunity>getOpportunities() {
return (List<Opportunity>) setCon.getRecords();
    }
}

 

 

 

vf page code

   

<apex:page controller="OppsController">

<apex:chart data="{!Opportunities}" width="600" height="400">

<apex:axis type="Category" position="left" fields="Name" title="Opportunities"/>

<apex:axis type="Numeric" position="bottom" fields="Amount" title="Amount"/>

<apex:barSeries orientation="horizontal" axis="bottom"xField="Name"yField="Amount"/>

</apex:chart>

<apex:dataTable value="{!Opportunities}"var="opp">

<apex:column value="{!opp.name}"/>

<apex:column value="{!opp.amount}"/>

</apex:dataTable>

</apex:page>

 

 

 

Hi All,

 

I am getting the below error  in class while developing visualforcepage for   page reference. Please correct me 

 

 

System.QueryException: List has no rows for assignment to SObject 

 

Class.MyCustomController.<init>: line 4, column

 

visualforce page code:

<apex:page controller="MyCustomController" tabStyle="Account" >
<apex:form >
<apex:pageBlock title="Accountdetails">
<apex:pageBlockSection title="AccountInformation" collapsible="true">
<apex:inputfield value="{!Account.Name}"/>
<apex:inputfield value="{!Account.Phone}"/>
<apex:inputfield value="{!Account.Industry}"/>
<apex:inputfield value="{!Account.Rating}"/>
<apex:inputfield value="{!Account.Website}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Accountdetails" collapsible="true">
<apex:inputfield value="{!Account.BillingCity}"/>
<apex:inputfield value="{!Account.billingCountry}"/>
<apex:inputfield value="{!Account.Shippingcity}"/>
<apex:inputfield value="{!Account.shippingCountry}"/>
<apex:inputfield value="{!Account.Annualrevenue}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

class

 

 

public class MyCustomController {
public Account acc;
public MyCustomController(){
acc=[select name,id,phone,industry,website,rating,BillingCity,BillingCountry,
ShippingCity,ShippingCountry,AnnualRevenue from Account where id=:Apexpages.currentPage().getParameters().get('id')];

}
public Account getAccount() {
return acc;
}
public PageReference saveMethod()
{
update acc;
PageReference pf=new apexPages.StandardController(acc).view();
return pf;
}
}

 

hi could u give the soluti

trigger salesContacts on Opportunity (after insert){
List<OpportunityShare> sharesToCreate = new List<OpportunityShare>();
List<OpportunityTeamMember> oppteam = new List<OpportunityTeamMember> ();

if(trigger.new[0].Partner_User__c != null) {
OpportunityShare oshare = new OpportunityShare();
oshare.OpportunityAccessLevel = 'Edit';
oshare.OpportunityId = trigger.new[0].Id;
oshare.UserOrGroupId = trigger.new[0].Partner_User__c;
sharesToCreate.add(oshare);

OpportunityTeamMember ot = new OpportunityTeamMember();
ot.OpportunityId = trigger.new[0].Id;
ot.UserId = trigger.new[0].Partner_User__c;
ot.TeamMemberRole = 'Reseller';
oppteam.add(ot);
}


// do the DML to create shares
if (!sharesToCreate.isEmpty())
insert sharesToCreate;

// do the DML to create shares
if (!oppteam.isEmpty())
insert oppteam;
}

on for above error given the code below