• Surendra Choudhary 1
  • NEWBIE
  • 33 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 10
    Replies
I am using an apex:Pageblock with a 6 column panelgrid to create pagination for a custom related list. I have everything working ok except for 1 piece. I created a "Go to List" function that pulls up the list of related records. So that this will appear, I am using the apes:commandLink value function as follows:
  <apex:commandLink value="Go to List" rendered="{!units.hasNext}" action="{!showAll}"/>
This block gives users these options: Go to List  Next  Last on page 1, Go to List First Previous Next Last on page 2 and so on. On the last page, the user sees First  Previous as options 
I think this is where i painted myself into a corner; the Go to List option appears only as long as there is a "Next" option; on the last page (no next), Go to List is not an option.

Here is the pertinent block of code:
 </apex:pageBlockButtons> 
      <apex:panelGrid columns="6" id="linkPanel">
        <apex:commandLink value="Go to List" rendered="{!units.hasNext}" action="{!showAll}"/>       
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!first}" value="First" rendered="{!units.hasPrevious}"/>
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!previous}" rendered="{!units.hasPrevious}" value="Previous"/>
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!next}" rendered="{!units.hasNext}" value="Next"/>
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!last}" rendered="{!units.hasNext}" value="Last"/>
        <apex:outputText id="pNum">{!IF(noofrecords=0,'No records to display',TEXT((units.pageNumber * size)+1-size)+'-'+IF((units.pageNumber * size)>noOfRecords, TEXT(noOfRecords),TEXT((units.pageNumber * size)))+' of '+ TEXT(noofrecords))}</apex:outputText>
        <apex:outputPanel style="color:#4AA02C;font-weight:bold">
        <apex:actionStatus id="fetchStatus" startText="Fetching..." stopText=""/>
        </apex:outputPanel>
      </apex:PanelGrid>
    </apex:pageBlock>

Is there another function that I can use to ensure that the Go to Link option appears on the last page of the list? Thanks.
The role will involve:
  • Developing customized solutions with the Salesforce platform to support critical business functions
  • Managing daily support and maintenance of internal Salesforce instance, and conduct longer-term improvement operations to ensure compatibility with evolving mission requirements
  • Communicating with project managers, clients and other developers to design cohesive project strategies and ensure effective collaboration throughout all phases of development, testing and deployment
  • Maintaining a flexible and proactive work environment, to facilitate a quick response to changing project requirements and customer objectives
  • Interacting with clients, managers and end users as necessary to analyse project objectives and capability requirements, including specifications for user interfaces, customized applications and interactions with internal Salesforce instances

The successful candidate will have experience in the following key areas:
  • APEX Experience
  • Visualforce and Salesforce.com platform experience]
  • SQL experience
  • Experience developing customer -facing user interfaces
  • C# or Node.js development experience on cloud platforms
  • Understanding of JSON and XML Schema Documents
  • Unit and integration testing

If you have experience with Salesforce development standard capabilities SFDC then this will be highly desirable.
 list<account> acc= [select id from account where name='wipro' ];
list<contact> cons=  new list<contact>();
for(list<account> a : acc)
  { 
     contact con = new contact();
      con.firstname='schnider';
      con.lastname='electrics';
      con.AccountId=acc.Id;
      cons.add(con);
            
     }
insert cons;



how to solve it 
Hi,
I have custom lookup field in a account object 
lookup to the user

My question is i have to prepopulate the field with the user name that means owner of the account

please help me to sort out this

Thanks & Regards
Pratyusha.K
I have users who are updating Tasks (Activities) on a custom object (Deal__c), and they want a function to copy the data from the Task fields on the Deal to the Task fields on the related Account, as there are often two different audiences for the Task update. I would create a new checkbox field for the Deal Task Layout (Copy to Account): my question is which would be the better tool to use when the Deal Task box is checked: Process Builder (which I know has some limitations) or an Apex trigger? Thanks.
I am using an apex:Pageblock with a 6 column panelgrid to create pagination for a custom related list. I have everything working ok except for 1 piece. I created a "Go to List" function that pulls up the list of related records. So that this will appear, I am using the apes:commandLink value function as follows:
  <apex:commandLink value="Go to List" rendered="{!units.hasNext}" action="{!showAll}"/>
This block gives users these options: Go to List  Next  Last on page 1, Go to List First Previous Next Last on page 2 and so on. On the last page, the user sees First  Previous as options 
I think this is where i painted myself into a corner; the Go to List option appears only as long as there is a "Next" option; on the last page (no next), Go to List is not an option.

Here is the pertinent block of code:
 </apex:pageBlockButtons> 
      <apex:panelGrid columns="6" id="linkPanel">
        <apex:commandLink value="Go to List" rendered="{!units.hasNext}" action="{!showAll}"/>       
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!first}" value="First" rendered="{!units.hasPrevious}"/>
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!previous}" rendered="{!units.hasPrevious}" value="Previous"/>
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!next}" rendered="{!units.hasNext}" value="Next"/>
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!last}" rendered="{!units.hasNext}" value="Last"/>
        <apex:outputText id="pNum">{!IF(noofrecords=0,'No records to display',TEXT((units.pageNumber * size)+1-size)+'-'+IF((units.pageNumber * size)>noOfRecords, TEXT(noOfRecords),TEXT((units.pageNumber * size)))+' of '+ TEXT(noofrecords))}</apex:outputText>
        <apex:outputPanel style="color:#4AA02C;font-weight:bold">
        <apex:actionStatus id="fetchStatus" startText="Fetching..." stopText=""/>
        </apex:outputPanel>
      </apex:PanelGrid>
    </apex:pageBlock>

Is there another function that I can use to ensure that the Go to Link option appears on the last page of the list? Thanks.
hi 
i am a salesforce learner 
I am getting a problem in my code any one give me a guidence 
this is my vf code
=====================
<apex:page standardController="lead" extensions="newfunctionofleads" tabStyle="lead">
  <apex:form >
      <apex:pageBlock >
          <apex:pageBlockButtons location="top">
              <apex:commandButton value="New" action="{!gotoeditpage}"/>
          </apex:pageBlockButtons>
         </apex:pageBlock>
  </apex:form>
</apex:page>

this is my controller:
==============
public with sharing class newfunctionofleads {

    public newfunctionofleads(ApexPages.StandardController controller) 
    }
    public void gotoeditpage()
    {
        list<user> lstusers = [Select id, name, profileid from user];
        
        for(user u: lstusers)
        {
          if(u.profileid == '00e280000028dLaAAI' )
         {
             getvender();
         }
         else if(u.profileid == '00e28000000Z6uZAAS')
         { 
             getadmin();
         }
        }
    } 
    public pagereference getvender()
    {
       pagereference pgref = new pagereference('https://ap2.salesforce.com/00Q/e?retURL=%2F00Q%2Fo');
       return pgref.setredirect(true);  
    }
    
    public pagereference getadmin()
    {
       pagereference pgref = new pagereference('https://ap2.salesforce.com/00Q/e?retURL=%2F00Q%2Fo');
       return pgref.setredirect(true);
    }
}
==========================================
I am created a new button when vendor user hits it, directly vendor record type should open silmilarly with the other user so please help me to over come this problem 
I have created a visualforce page and allocated a custom object to it then assigned it to a tab. The fields appear but the contents don't. Does the visualforce page need to be allocated the custom object? 
I am using an apex:Pageblock with a 6 column panelgrid to create pagination for a custom related list. I have everything working ok except for 1 piece. I created a "Go to List" function that pulls up the list of related records. So that this will appear, I am using the apes:commandLink value function as follows:
  <apex:commandLink value="Go to List" rendered="{!units.hasNext}" action="{!showAll}"/>
This block gives users these options: Go to List  Next  Last on page 1, Go to List First Previous Next Last on page 2 and so on. On the last page, the user sees First  Previous as options 
I think this is where i painted myself into a corner; the Go to List option appears only as long as there is a "Next" option; on the last page (no next), Go to List is not an option.

Here is the pertinent block of code:
 </apex:pageBlockButtons> 
      <apex:panelGrid columns="6" id="linkPanel">
        <apex:commandLink value="Go to List" rendered="{!units.hasNext}" action="{!showAll}"/>       
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!first}" value="First" rendered="{!units.hasPrevious}"/>
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!previous}" rendered="{!units.hasPrevious}" value="Previous"/>
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!next}" rendered="{!units.hasNext}" value="Next"/>
        <apex:commandLink status="fetchStatus" reRender="pblock" action="{!last}" rendered="{!units.hasNext}" value="Last"/>
        <apex:outputText id="pNum">{!IF(noofrecords=0,'No records to display',TEXT((units.pageNumber * size)+1-size)+'-'+IF((units.pageNumber * size)>noOfRecords, TEXT(noOfRecords),TEXT((units.pageNumber * size)))+' of '+ TEXT(noofrecords))}</apex:outputText>
        <apex:outputPanel style="color:#4AA02C;font-weight:bold">
        <apex:actionStatus id="fetchStatus" startText="Fetching..." stopText=""/>
        </apex:outputPanel>
      </apex:PanelGrid>
    </apex:pageBlock>

Is there another function that I can use to ensure that the Go to Link option appears on the last page of the list? Thanks.