• Arun Chaubey
  • NEWBIE
  • 60 Points
  • Member since 2015
  • Symphony Teleca


  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 14
    Likes Given
  • 8
    Questions
  • 12
    Replies
Hello all,
Can you please let me know what is Data.com in salesforce ?, what are the features of it and how to setup it in salesforce dev org.
Thanks in advance !!
Hi Friend,
I have a task to create a Visualforce Page that shows all contacts (say 50) with Email IDs
  • The page should show 5 contacts at a time
  • Pagination should be done. So there will be 50/5 = 10 pages
  • Each of the pages should have First, Previous, Next, Last as links
  • Each page should be numbered (Page 1, Page 2,....) 
  • Column Shoul be First Name, Last Name, Mobile, State, Email ID
Now my question is How to fetch all contacts and show it on a page, I have done this by 
<apex:pageBlockTable value="{!Contact}" var="item">
but this shows only the field lable name, No value is getting papulated.
My Second question is I am not able to add columns for State and Mobile. It shows error - Error: Invalid field States for SObject Contact
I used this code for it - <apex:column value="{! item.State}"/>
My third Question is how to add Pagination on my page like first, last, next, and previous buttons. 
Hi Friends,

I have enabled inline editor option from the customization settings but it is still not working. How to enable it again?
What is Catter and cats ? Please explain in detail with realtime example? one of exercise in trailhead which I did not able to understand.
I have logged in as administrator User in developer edition, How can I create sandbox ?? I have clicked on setup menu but there is no option of sandbox available. I clicked on deployment settings but it shows Insufficient Privileges ? ? Is sandbox feature is available in developer edition. kindly help?
Hi friends, I am getting this error " Error: Compile Error: Invalid type: Warehouse__c at line 7 column 39 " while practising the visualforce workbook exercise - Creating the WarehouseUtils Class .
global with sharing class WarehouseUtils {
public WarehouseUtils(ApexPages.StandardSetController controller) { }
// Find warehouses nearest a geolocation
@RemoteAction
global static List<Warehouse__c> findNearbyWarehouses(String lat, String lon) {
// Initialize results to an empty list
List<Warehouse__c> results = new List<Warehouse__c>();
// SOQL query to get the nearest warehouses
String queryString =
'SELECT Id, Name, Location__Longitude__s, Location__Latitude__s, ' +
'Street_Address__c, Phone__c, City__c ' +
'FROM Warehouse__c ' +
'WHERE DISTANCE(Location__c, GEOLOCATION('+lat+','+lon+'), \'mi\') < 20 ' +
'ORDER BY DISTANCE(Location__c, GEOLOCATION('+lat+','+lon+'), \'mi\') ' +
'LIMIT 10';
// Run the query
results = database.Query(queryString);
// Return the query results
return(results);
}
}
Anybode help ?
Hi,
I am not able to understand the below question correctly Please help me out. - 
Create a class that has a method accepting two strings. The method searches for contacts that have a last name matching the first string and a mailing postal code (API name: MailingPostalCode) matching the second. It gets the ID and Name of those contacts and returns them.The Apex class must be called 'ContactSearch' and be in the public scope.
The Apex class must have a public static method called 'searchForContacts'.
The 'searchForContacts' method must accept two incoming strings as parameters, find any contact that has a last name matching the first, and mailing postal code matching the second string. The method should return a list of Contact records with at least the ID and Name fields.
The return type for 'searchForContacts' must be 'List<Contact>'.
create an Apex class that inserts a new account named after an incoming parameter. If the account is successfully inserted, the method should return the account record. If a DML exception occurs, the method should return null?
The Apex class must be called 'AccountHandler' and be in the public scope.
The Apex class must have a public static method called 'insertNewAccount'.
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
The 'insertNewAccount' method must also accept an empty string, catch the failed DML and return null.
I have created approval process for case escalataion, but it is not showing in chatter feed
I have logged in as administrator User in developer edition, How can I create sandbox ?? I have clicked on setup menu but there is no option of sandbox available. I clicked on deployment settings but it shows Insufficient Privileges ? ? Is sandbox feature is available in developer edition. kindly help?
create an Apex class that inserts a new account named after an incoming parameter. If the account is successfully inserted, the method should return the account record. If a DML exception occurs, the method should return null?
The Apex class must be called 'AccountHandler' and be in the public scope.
The Apex class must have a public static method called 'insertNewAccount'.
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
The 'insertNewAccount' method must also accept an empty string, catch the failed DML and return null.
Hi Friends,

I have enabled inline editor option from the customization settings but it is still not working. How to enable it again?
What is Catter and cats ? Please explain in detail with realtime example? one of exercise in trailhead which I did not able to understand.
I have logged in as administrator User in developer edition, How can I create sandbox ?? I have clicked on setup menu but there is no option of sandbox available. I clicked on deployment settings but it shows Insufficient Privileges ? ? Is sandbox feature is available in developer edition. kindly help?
Hello all,
Can you please let me know what is Data.com in salesforce ?, what are the features of it and how to setup it in salesforce dev org.
Thanks in advance !!
wats is use of junction object ,why and when do we use it
Hi friends, I am getting this error " Error: Compile Error: Invalid type: Warehouse__c at line 7 column 39 " while practising the visualforce workbook exercise - Creating the WarehouseUtils Class .
global with sharing class WarehouseUtils {
public WarehouseUtils(ApexPages.StandardSetController controller) { }
// Find warehouses nearest a geolocation
@RemoteAction
global static List<Warehouse__c> findNearbyWarehouses(String lat, String lon) {
// Initialize results to an empty list
List<Warehouse__c> results = new List<Warehouse__c>();
// SOQL query to get the nearest warehouses
String queryString =
'SELECT Id, Name, Location__Longitude__s, Location__Latitude__s, ' +
'Street_Address__c, Phone__c, City__c ' +
'FROM Warehouse__c ' +
'WHERE DISTANCE(Location__c, GEOLOCATION('+lat+','+lon+'), \'mi\') < 20 ' +
'ORDER BY DISTANCE(Location__c, GEOLOCATION('+lat+','+lon+'), \'mi\') ' +
'LIMIT 10';
// Run the query
results = database.Query(queryString);
// Return the query results
return(results);
}
}
Anybode help ?
I want to disable a VF page untill it is fully loaded!
i have a VF page which is showing around 1000 contact records(from which i have select some records through checkbox) but page takes some time to load.
this is the point where i am finding difficulty ,when page is loading and someone click on checkbox ,that record is not selected bcoz page is not fully loaded.
plz help me in this issue
 
Hi,
I am not able to understand the below question correctly Please help me out. - 
Create a class that has a method accepting two strings. The method searches for contacts that have a last name matching the first string and a mailing postal code (API name: MailingPostalCode) matching the second. It gets the ID and Name of those contacts and returns them.The Apex class must be called 'ContactSearch' and be in the public scope.
The Apex class must have a public static method called 'searchForContacts'.
The 'searchForContacts' method must accept two incoming strings as parameters, find any contact that has a last name matching the first, and mailing postal code matching the second string. The method should return a list of Contact records with at least the ID and Name fields.
The return type for 'searchForContacts' must be 'List<Contact>'.
Hai folks,

Could u plz tell me the exact difference between Database.query() and Database.getQueryLocator(). When and in which situation v need to make use of respective methods. TIA
create an Apex class that inserts a new account named after an incoming parameter. If the account is successfully inserted, the method should return the account record. If a DML exception occurs, the method should return null?
The Apex class must be called 'AccountHandler' and be in the public scope.
The Apex class must have a public static method called 'insertNewAccount'.
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
The 'insertNewAccount' method must also accept an empty string, catch the failed DML and return null.
Hello all,
Can you please let me know what is Data.com in salesforce ?, what are the features of it and how to setup it in salesforce dev org.
Thanks in advance !!
I want to disable a VF page untill it is fully loaded!
i have a VF page which is showing around 1000 contact records(from which i have select some records through checkbox) but page takes some time to load.
this is the point where i am finding difficulty ,when page is loading and someone click on checkbox ,that record is not selected bcoz page is not fully loaded.
plz help me in this issue
 
Hi All,

Is there a way in Apex to see if the specified text passes the salesforce password policies. 

Use Case: In our customer portal, we are allowing new users to register for the portal. So we are inserting a new user and setting the password in the same call. Now if the password doesnt pass the password policies, than the user is created in sf, but the password is not set. (we are not using temporary password approach)

Thanks
Sid
Hai folks,

Could u plz tell me the exact difference between Database.query() and Database.getQueryLocator(). When and in which situation v need to make use of respective methods. TIA
<apex:page Controller="TestPage_ctrl">
  <apex:form >
        <apex:outputPanel id="outputPane">
             {!IntegerStringMap}
                           <apex:outputPanel id="outputPanelId">
                            <apex:repeat value="{!IntegerStringMap}" var="a">
                                {!a}
                            </apex:repeat>
                     </apex:outputPanel>
                     </apex:outputPanel>
                     <apex:commandButton value="Add" action="{!addLotToConvert}" reRender="outputPane"/>
        </apex:form>
</apex:page>
public class TestPage_ctrl{

    public integer i { get ; set ;}
    public map<integer,String> IntegerStringMap { get; set; }
    
    public TestPage_ctrl(){
        i = 0;
        IntegerStringMap = new map<integer,String>();
        IntegerStringMap.put(i,'Test'+i);
    }
    
    public void  addLotToConvert(){
        i = i+1;
        IntegerStringMap.put(i,'Test'+i);
        //return null;
    }
}

When trying to use the Above code in Developer org it works as expected showing the Map contents and the Map Key as same. But when using this code in CS10/CS11 it does not. And there is a difference between the Contents and the Key of map.

 
Hi Guys,

    Hope so many peoples integrated google map in visualforce page using the javascript. From Salesforce Spring'15 onwards, Map components are released. Some of the people may not aware about this.

Please find the below link it will helpful who don't know about this component..!

http://salesforcekings.blogspot.in/2015/03/of-us-already-known-about-thegoogle-map.html
Hello,

I am currently in the process of overriding the native Community login flow of SalesForce with our own custom-made. The custom login flow for Community users (external to our organization) works fine but of course our internal users, if they want to access the community, cannot use the same flow since they need to go to login.salesforce.com (or any othe rinstance URL such as https://na2.salesforce.com), enter their credentials to login to the CRM org and then access the community from there.

Therefore in the login screen for the Community, besides the form to enter the credentials for Communtiy external users, I would like to add a link that redirects our internal users to the CRM login page and still keeping track of the Community URL they were browsing when they were prompted to login.

In order to achieve this, I added the folliwing span element to the SiteLogin component:
<span>Our internal Employee? Login <a href="{! EmployeeLoginURL }">here</a></span>
And in the SiteLoginController (that controls SiteLogin):
global PageReference EmployeeLoginURL {
        get
        {
            String startUrl = System.currentPageReference().getParameters().get('startURL');
            String sfBaseUrl = System.URL.getSalesforceBaseUrl().toExternalForm();
            
            return new PageReference(sfBaseUrl + '/login?' + startURL);
        }
    }
This code does not work for the following reasons:
  1. In some cases EmployeeLoginURL is the base URL of our Community instead of our CRM instance
  2. In some cases EmployeeLoginURL is treated as a relative path and added to the root path of the communityand generates a page not found error;
  3. The login parameter is (indeed) not a valid one.
In some other SF Community, I noticed that in the login screen they have the same fucntionality I am looking for and the displayed link is in the format:
https://na2.salesforce.com/servlet/networks/session/create?site=0DM400000003deffa&refURL=[some ref url]

That correctly redirects internal users to the SF CRM login screen. I guess this link is machine-generated since it works without modification in both sandbox and production instances. How can I programmaticaly create such URL? Thanks

 
              



 
Hi,

I am using a class
public class EventBookingRecs
{
        public sObject EventBooking {get; set;}
        public Account bookingAccount {get;set;}
        public Contact bookingContact {get;set;}
}
where variable EventBooking is based on custom object EventBooking already created. The custom object has fields like Name, Status__c etc. I am using EventBooking in visualforce page -> pageblocktable.
example
<apex:pageblocktable value="{!EventBookingRecords}" var="ebrecs" id="pbt">
       <apex:Column >
              <apex:facet name="header">Booking Status</apex:facet>
                    <apex:selectList id="status" onchange="saveValues({!ebrecs.index})" value="{!ebrecs.EventBooking['Status__c']}" size="1">
                        <apex:selectOption itemValue="" itemLabel=""/>
                        <apex:selectOption itemValue="Attended" itemLabel="Attended"/>
                        <apex:selectOption itemValue="No Show" itemLabel="No Show"/>
                    </apex:selectList>
       </apex:Column>
</apex:pageblocktable>

Could you please let me know how to write a getter and setter method for EventBooking['Status__c'] (EventBookingRecs.EventBooking.Status__c) so that when values changes on screen it should set it permamently and screen refresh should not affect it?

Please let me know if you need more details

Best Regards,

Rahul
User-added image
It takes long time to save this simple apex page. So long that i lost patience and closed the browser.
I have tried a few times but saw the status changing to "Saved" .
When i forcibly close the console window all changes are lost.
Tried it on latest Firefox and Chrome browsers with same result.

 
I am having a problem with using named credentials for an HTTP callout.  When I follow the example in the article titled, "Spring '15 - Simplify Authenticated Apex Callouts by Specifying Named Credentials as Endpoints" (https://help.salesforce.com/HTViewSolution?id=000206761&language=en_US" target="_blank), I get a 401 Unauthorized error from the server I'm trying to connect to.
I used Runscope to inspect the headers being sent to the server from Salesforce, and it seems that using named credentials is leaving off the "Basic" prefix from the Authorization header's value.  For example, if your username is "abc" and your password is "123", using named credentials sends this in the header:
Authorization: YWJjOjEyMw==
Instead, it should be sending this for it to work:
Authorization: Basic YWJjOjEyMw==
Is this a bug with Named Credentials?
Hi All,

I had scheduled around 22 Jobs till last Friday on on SF Org with different schedules. All these 22 jobs were visible in Scheduled Jobs Tab. Starting from this Monday(16th Feb 2015) I'm getting an Error : System.AsyncException: You have exceeded the maximum number (5) of Apex scheduled jobs when I try to schedule the same number of Jobs.
Its allowing only 5 Jobs to be submitted. 

Org might have been upgraded to Spring 2015 over the weekend. As per the Spring 2015 notes, we can use Apex Flex Queues to shcedule upto 100 Apex Jobs. We tried activating the Apex Flex Queue from Critical Updates section, but still the issue persists.

Need advise on what can be done to get the limit back to 100.
Hi all,
    How to get Latitude and Longitude Values dynamically to update while inserting Records into Object




Thanks in Advance.
  • December 11, 2014
  • Like
  • 2

Hey,

 

When I use System.Schedule() to schedule an Apex job, I am experiencing some strange behavior:

 

* The job does show up on the 'Scheduled Jobs' page on the org, but its 'Manage' link is missing (the only link beside the job entry is 'Del').

 

* According to the 'Scheduled Jobs' page, the job does run at the scheduled time, but there is no evidence anywhere else in the org that the job actually run.  No debug logs appear and none of the side-effects of the job appear on the org.  I even stubbed out the class' execute() method with a System.assert ( False ) statement, to make it throw out an error email, but that doesn't happen either.  It definitely seems like nothing at all is being executed.

 

When I schedule the job via the UI (Develop -> Apex Classes -> Schedule Apex), it runs fine as expected.

 

Why is this?

 

(and why oh why is the page behind the 'Manage' link read-only??)

 

Thanks

  • October 27, 2011
  • Like
  • 2

Hi I have a vpage as follows..


<apex:outputLabel style="font-weight:bold;" value="Search By Branch Code" ></apex:outputLabel>
        <apex:inputText value="{!textData}"/>

 

Iam trying to pass this input textfield value(what ever i enter) to the controller by using getters and setters but iam not able to pass the value its passing  just anull value

 

Getters and setters as below

 

private String textdata = null;

    public String getTextData() { return textdata; }
    public void setTextData(String data) { textdata = data; }
 

 So Some one plz help me in passing myy in put field value to controller so that i want to use that value in my soql query

 

Eg:

CAF_Bank__c [] currentbanknames=[SELECT  Bank_Name__c FROM CAF_Bank__c  where Branch_Code__c=:textdata];

            So plz tell me with an example.............

 

       

 

                                                                                                    Thanks& Regards

                                                                                                          Anu...