title: RForcecom accessing unknown field names
body: <p>My final aim is to extract data from Salesforce accounts for general use in R. I spotted the RForcecom package (<a href="https://hiratake55.wordpress.com/2013/03/28/rforcecom/" rel="noreferrer">https://hiratake55.wordpress.com/2013/03/28/rforcecom/</a>) which looks very useful indeed, thanks @hiratake55 for writing it! Unfortunately I am having a small problem.</p>
  
  <p>I am able to sign in to my account and then access objects within and store as a <code>data.frame</code> just as the intro notes say. </p>
  
  <p>The problem is that I want to access certain fields within the SOQL object and I don't know the names of those fields.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>    library(RForcecom)
  
      username &lt;- "" # my email address
      password &lt;- "" # my website password + security token
      instanceURL &lt;- "https://eu5.salesforce.com/"
      apiVersion &lt;- "34.0"
      session &lt;- rforcecom.login(username, password, instanceURL, apiVersion)
  
      # R Query
      objectName &lt;- "Contact"
      fields &lt;- c("Id", "Name", "Phone")
      rforcecom.retrieve(session, objectName, fields)
  </code></pre>
  
  <p>This works fine and returns a <code>data.frame</code> just as RForcecom says on the tin. Now I also want to extract for example the field "Contact Owner Alias" (the field has this name on the web interface of SalesForce). I tried the following:</p>
  
  <pre><code>    fields &lt;- c("Id", "Name", "Phone", "Contact Owner Alias")
      rforcecom.retrieve(session, objectName, fields)
  </code></pre>
  
  <p>This gave an error:</p>
  
  <pre><code>    Error in rforcecom.query(session, soqlQuery) : 
        MALFORMED_QUERY: Id, Name, Phone, Contact Owner Alias FROM Contact
                                    ^
      ERROR at Row:1:Column:38
      unexpected token: Alias
  </code></pre>
  
  <p><strong>QUESTION</strong></p>
  
  <p>Is there a way to retrieve all of the filenames in R?
  Or is there a way to return data from all fields without knowing their names.</p>
  
  <p><strong>CAVEAT</strong></p>
  
  <p>I know that part of the problem is my unfamiliarity with SOQL but it thought I would ask around to see if this had been solved inside R. If the answer is "go learn SOQL" that's ok, I just thought I would ask first.</p>
  
  <p>Thanks for any help!</p>