• smith india
  • NEWBIE
  • 0 Points
  • Member since 2012

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

1) how many rollup summary fields can we create for an object?

2) how many record types for object 

3) how many pick-lists for object

4) how many active validation rules for object

5) what is Queue ?

6) how many reports we can create in an app ?

1) what is the diff between standard obeject and user object?

2) who can use importwizard ?

3) what is field level security ?

4) diff between formula field and rollup summary field ?

5) what is related list section and button section ?

 

this program is not swapping the records ..

 

<apex:page controller="swapcls" >
<apex:form >
<apex:pageblock >
<apex:pageblockTable value="{!wrap}" var="w">
<apex:column >
<apex:selectCheckboxes value="{!w.check}"/>
</apex:column>
<apex:column value="{!w.name.name}"/>
</apex:pageblockTable>
<apex:commandButton value="swap" action="{!swaprec}" />
<apex:pageMessage summary="Select any Two Records" severity="warning" strength="3" rendered="{!pgmsg}" />
<apex:pageMessages />
</apex:pageblock>
</apex:form>
</apex:page>

 

 

public with sharing class swapcls
{

public boolean pgmsg { get; set; }

public PageReference swaprec()
{
             list<swap_record__c> lstswap = new list<swap_record__c>();
             for(wrapper s:wrap)
             {
             if(s.check == true)
             lstswap.add(s.name);
             }
           System.debug('------------------>'+lstswap);
  if(lstswap.size()>2 || lstswap.size()==1)
 {
 pgmsg = true;
 }
else
{
swap_record__c a;
a = lstswap[0];
lstswap[0] = lstswap[1];
lstswap[1] = a;
}

pagereference ref = new pagereference('/apex/swaprecords');
return ref;
}

public list<wrapper> wrap { get; set; }

public class wrapper
{
public boolean check{get; set;}
public swap_record__c name{get; set;}
public integer num{get;set;}
public wrapper(boolean b, swap_record__c n, integer nbr)
{
check = b;
name = n;
num = nbr;
}
}
public swapcls()
{
wrap = new list<wrapper>();
list<swap_record__c> lst = [select name from swap_record__c];

integer i=0;
for(swap_record__C c:lst)
{
wrap.add(new wrapper(false,c,i));
i++;
}
}
}

Error: Conversion Error setting value '' for '#{w.check}'.

 

<apex:page controller="swapcls" >
<apex:form >
<apex:pageblock >
<apex:pageblockTable value="{!wrap}" var="w">
<apex:column >
<apex:selectCheckboxes value="{!w.check}"/>
</apex:column>
<apex:column value="{!w.name.name}"/>
</apex:pageblockTable>
<apex:commandButton value="swap" action="{!swaprec}" />
<apex:pageMessage summary="Select any Two Records" severity="warning" strength="3" rendered="{!pgmsg}" />
<apex:pageMessages />
</apex:pageblock>
</apex:form>
</apex:page>

 

 

class

 

public with sharing class swapcls  {

public boolean pgmsg { get; set; }

public PageReference swaprec()  {
list<swap_record__c> lstswap = new list<swap_record__c>();
 for(wrapper s:wrap)
{
if(s.check == true)
lstswap.add(s.name);
}
System.debug('------------------>'+lstswap);
 if(lstswap.size()>2 || lstswap.size()==1)
{
pgmsg = true;
}
else
{
swap_record__c a;
a = lstswap[0];
lstswap[0] = lstswap[1];
lstswap[1] = a;
}

agereference ref = new pagereference('/apex/swaprecords');
return ref;
}

public list<wrapper> wrap { get; set; }

public class wrapper
{
public boolean check{get; set;}
public swap_record__c name{get; set;}
public integer num{get;set;}
public wrapper(boolean b, swap_record__c n, integer nbr)
{
check = b;
name = n;
num = nbr;
}
}
public swapcls()
{
wrap = new list<wrapper>();
list<swap_record__c> lst = [select name from swap_record__c];
integer i=0;
for(swap_record__C c:lst)
{
wrap.add(new wrapper(false,c,i));
i++;
}}}

 

 
 


 



1) what is the diff between standard obeject and user object?

2) who can use importwizard ?

3) what is field level security ?

4) diff between formula field and rollup summary field ?

5) what is related list section and button section ?

 

this program is not swapping the records ..

 

<apex:page controller="swapcls" >
<apex:form >
<apex:pageblock >
<apex:pageblockTable value="{!wrap}" var="w">
<apex:column >
<apex:selectCheckboxes value="{!w.check}"/>
</apex:column>
<apex:column value="{!w.name.name}"/>
</apex:pageblockTable>
<apex:commandButton value="swap" action="{!swaprec}" />
<apex:pageMessage summary="Select any Two Records" severity="warning" strength="3" rendered="{!pgmsg}" />
<apex:pageMessages />
</apex:pageblock>
</apex:form>
</apex:page>

 

 

public with sharing class swapcls
{

public boolean pgmsg { get; set; }

public PageReference swaprec()
{
             list<swap_record__c> lstswap = new list<swap_record__c>();
             for(wrapper s:wrap)
             {
             if(s.check == true)
             lstswap.add(s.name);
             }
           System.debug('------------------>'+lstswap);
  if(lstswap.size()>2 || lstswap.size()==1)
 {
 pgmsg = true;
 }
else
{
swap_record__c a;
a = lstswap[0];
lstswap[0] = lstswap[1];
lstswap[1] = a;
}

pagereference ref = new pagereference('/apex/swaprecords');
return ref;
}

public list<wrapper> wrap { get; set; }

public class wrapper
{
public boolean check{get; set;}
public swap_record__c name{get; set;}
public integer num{get;set;}
public wrapper(boolean b, swap_record__c n, integer nbr)
{
check = b;
name = n;
num = nbr;
}
}
public swapcls()
{
wrap = new list<wrapper>();
list<swap_record__c> lst = [select name from swap_record__c];

integer i=0;
for(swap_record__C c:lst)
{
wrap.add(new wrapper(false,c,i));
i++;
}
}
}