• sree sfdc
  • NEWBIE
  • 80 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 5
    Replies
hi floks,

i  have requirmenet ,

how to create custom convert button .to convert standarad object to custom object  .
 pls help me how to do this  ..


thanks 
hi friends ,
pls help me to write following trigger
here contact is having custom field primary of type checkbox
● Each account may have multiple contacts but only one marked “Primary”
● Each account must have 1 primary contact.
● The account should display the name of its primary contact on the account detail screen (i.e. in a field).

pls help me
hi floks
i have one requirment .in child object we create a record it ill update to parent record also
and it has to count all the records ..

pls help how to slove this ...
hi floks ,

how to reslove this error pls help me

Compile Error: unexpected token: 'global'
Hi 
This is my code please help me 
VF Page
-------------
<apex:page controller="pagination1">
<apex:form >
<apex:pageBlock id="details">
<apex:pageblockTable value="{!accountlist}" var="account">

<apex:column value="{!account.name}"/>
<apex:column value="{!account.rating}"/>
<apex:column value="{!account.phone}"/>
<apex:column value="{!account.NumberOfEmployees}"/>
</apex:pageblockTable>
<apex:pageBlockButtons >
<apex:commandButton value="Fisrt" action="{!first}" reRender="details" disabled="{!prev}"/>
<apex:commandButton value="Previous" action="{!prev}" reRender="details" disabled="{!prev}"/>
<apex:commandButton value="Next" action="{!nxt}" reRender="details" disabled="{!nxt}"/>
<apex:commandButton value="Last" action="{lst}" reRender="details" disabled="{!nxt}"/>

</apex:pageBlockButtons>

</apex:pageBlock>


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

Apex 
-------------
public class pagination1 {

   public class Pagination
{
private integer totalRecs = 0;
private integer OffsetSize = 0;
private integer LimitSize= 10;
public Pagination()
{
totalRecs = [select count() from account];
}
public List<account> getacclist()
{
List<account> acc = Database.Query('SELECT Name, rating, phone, numberofemployees,FROM account LIMIT :LimitSize OFFSET :OffsetSize');
System.debug('Values are'+ acc);
return acc;
}
public void First()
{
OffsetSize = 0;
}
public void previous()
{
OffsetSize = OffsetSize - LimitSize;
}
public void next()
{
OffsetSize = OffsetSize + LimitSize;
}public void Last()
{
OffsetSize = totalrecs – math.mod(totalRecs,LimitSize);
}
public boolean getprevious()
{
if(OffsetSize == 0)
return true;
else
return false;
}
public boolean getnext()
{
if((OffsetSize + LimitSize) > totalRecs)
return true;
else
return false;
}
}