• Jon L. Davies
  • NEWBIE
  • 5 Points
  • Member since 2007

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

Here is a scenario that I ran into that I am looking for some feedback on.

 

NOTE: All accounts are owned by the administrator account.  Reps have access only by account sharing.

 

Rep R1 is assigned to territory T1.  The Rep has access to all the accounts assigned to T1.  He/she creates contacts on account A1 and A2 but not on A3.  Later R1 is assigned to a new territory T2.  The problem is that the rep still has access to account A1 and A2 due to being the owner of the contacts. Account A3 the rep no longer has access to.

 

It doesn’t make sense that having access to the contact would grant you full access to the Account. They aren't parent/child objects so I wouldn't expect any inherited permissions.  Even if they were it should not go from child to parent.

 

 

Jon Davies

 

360 Vantage

3115 S. Price Road

Chandler, AZ 85248

 

I am trying to write a query to return any open tasks by all members who report under me.

select t.ownerid, t.createdbyid, t.description, 
(SELECT u.id from user u where direct_manager__c.id = 'myidgoeshere')
from task t
where t.isClosed = false

This - SELECT u.id from user u where direct_manager__c.id = 'myidgoeshere'  alone gets me all the id's for this people.  I think need to take that id and query the tasks.

I have been trying a variety syntax changes but can't seem to get it.  Any tips?

Thanks



Hello,

We're developing a small App for the AppExchange which will enable our third-party software to interact with the SF API. We have it working fine in our developer account, but when we deployed it via AppExchange to our organization's SF for beta testing, we found that the Professional accounts do not allow API access. (we use the API via Ajax within a Custom S-Control, and also via the external Partner WSDL from our own web servers). A majority of our customers are likely to have Professional accounts with Salesforce. My question is, what API access is allowed for Professional users?

Do we really have to tell our customers they have to upgrade to a prohibitively expensive Enterprise account just to use our little integration App? Why would there be so much developer focus on Ajax and other API-access platforms if a majority of the SalesForce customers are unable to run such apps?

Can anyone point me in the direction of documentation on the different licensing types and exactly what scripting/applications are allowed for each? Thanks.
-Nathan
With Flex 2, I'm trying to use TextInput to allow the user to enter information for the apex query, but haven't been able to successfully pass the information.
Here's how I retrieve the information:
      <mx:FormItem label="Enter an organization name to search: ">
          <mx:TextInput id="orgname" width="100%"/>
      </mx:FormItem>

Here's how I'm trying to use the data in the query:
     apex.query("Select Name, Phone, From Contact where account.name=orgname", new AsyncResponder(

Compiles fine, but when I run it, I get the following error:
(com.salesforce.results::Fault)#0
  detail = (Object)#1
    fault = (Object)#2
      column = 72
      exceptionCode = "MALFORMED_QUERY"
      exceptionMessage = "
From Contact where account.name=orgname
                                ^
ERROR at Row:1:Column:72
unexpected token: orgname"
      row = 1
      xsi:type = "sf:MalformedQueryFault"
  faultcode = "sf:MALFORMED_QUERY"
  faultstring = "MALFORMED_QUERY:
From Contact where account.name=orgname
                                ^
ERROR at Row:1:Column:72
unexpected token: orgname"


I am new at this, so be nice.

I am creating an SControl that uses Javascript to call a .Net Web service.

I will need the SessionID and the Server URL to create the binding in the .Net service to make calls on the SalesForce Database.

In the Javascript I am able to obtain the Session ID Using "this.__sfdcSessionID"

How do I obtain the Server URL?

Thanks

Pat

Hi, is there any easy ways to delete ALL records in an object with a single call rather than 200 records in batch.

sq
Hi.
 
I got from the API an example of how to connect and query SF for some data.  With data, I put together the following code.
 

try {

     //CREATES THE QUERY TO CALL SF WS

     string ls_Query = "SELECT FirstName,LastName,Email " +

                               "FROM Contact " +

                               "WHERE Id = '" + as_SFID + "'";

 

     //READS THE URL AND USER VALUES FROM THE WEB CONFIG

     string ls_SFURL = "https://test.salesforce.com/services/Soap/u/9.0";

     string ls_SFUser = "user";

     string ls_SFPassword = "password";

  

     //CREATES THE SF OBJECT

     SforceService lo_srvcSF = new SforceService();

     lo_srvcSF.Url = ls_SFURL;

 

    //LOGS TO THE SF WS

    LoginResult lo_SFLoginResult = lo_srvcSF.login(ls_SFUser,ls_SFPassword);

  

    //SAVES THE SESSION HEADER AND URL

    SessionHeader lo_SFSessionHeader = new SessionHeader();

    lo_SFSessionHeader.sessionId = lo_SFLoginResult.sessionId;

    lo_srvcSF.Url = lo_SFLoginResult.serverUrl;

    lo_srvcSF.SessionHeaderValue = lo_SFSessionHeader;

    string ls_SFUserID = lo_SFLoginResult.userId;

 

    //SENDS THE QUERY TO THE SF WS

    lo_srvcSF.QueryOptionsValue = new QueryOptions();

    lo_srvcSF.QueryOptionsValue.batchSize = 500;

    lo_srvcSF.QueryOptionsValue.batchSizeSpecified = true;

    QueryResult lo_QueryResult = null;

    lo_QueryResult = lo_srvcSF.query(ls_Query);

    if (lo_QueryResult == null)

          throw new Exception("The query retrieved a null result for the Contacts.");

     if (lo_QueryResult.size ==0)

          throw new Exception("The query retrieved cero records for the Contacts.");

 

     //GETS THE RECORDS RETRIEVED

     if (lo_QueryResult.size > 0)  {

           sObject[] lo_Records = lo_QueryResult.records;

           Contact lo_Contact = (Contact)lo_Records[0];

           as_FirstName = lo_Contact.FirstName;

           as_LastName = lo_Contact.LastName;

           as_EMail = lo_Contact.Email;

      }

}

catch(Exception Exp) {

     throw new Exception("Unable to read the details from Sales Force. The error was: " + Exp.Message);

}

 
When running this code, everything goes fine until line "lo_QueryResult = lo_srvcSF.query(ls_Query);".  The code is able to successful log to the WebServer, and properly assigns the session back, and everything.  But when it runs this line, I get an error saying "There is an error in XML document (1, 278)".  This doesn't say much.  Checking the innermessage it says "The specified type was not recognized: name='QueryResult', namespace='urn:partner.soap.sforce.com', at <result xmlns='urn:enterprise.soap.sforce.com'>.".  I compare this code with other one that works, and they are basically the same, but this one breaks.  I also tried getting that other code, and copy it, but breaks exactly the same.  I also tried in a different computer, with exactly the same error. 
 
Can someone please give me a  hand with this???
 
Regards
 
Victor
 
 
I have created a custom formula field by name 'Region' under Lead object with Return Type= Text
 
Now based on the Postal Code and State, Region field should be populated by Region value.
eg:
Area Code
(PostalCode)  State                Region
205AlabamaEast251AlabamaEast256AlabamaEast334AlabamaEast907AlaskaWest480ArizonaWest520ArizonaWest602ArizonaWest623ArizonaWest928ArizonaWest479ArkansasWest501ArkansasWest870ArkansasWest209CaliforniaWest213CaliforniaWest310CaliforniaWest323CaliforniaWest408CaliforniaWest415CaliforniaWest424CaliforniaWest510CaliforniaWest530CaliforniaWest559CaliforniaWest562CaliforniaWest619CaliforniaWest626CaliforniaWest650CaliforniaWest661CaliforniaWest707CaliforniaWest714CaliforniaWest760CaliforniaWest805CaliforniaWest818CaliforniaWest831CaliforniaWest858CaliforniaWest909CaliforniaWest916CaliforniaWest925CaliforniaWest949CaliforniaWest303ColoradoWest719ColoradoWest720ColoradoWest970ColoradoWest203ConnecticutEast475ConnecticutEast860ConnecticutEast959ConnecticutEast302DelawareEast239FloridaEast305FloridaEast321FloridaEast352FloridaEast386FloridaEast407FloridaEast561FloridaEast727FloridaEast754FloridaEast772FloridaEast786FloridaEast813FloridaEast850FloridaEast863FloridaEast904FloridaEast941FloridaEast954FloridaEast229GeorgiaEast404GeorgiaEast470GeorgiaEast478GeorgiaEast678GeorgiaEast706GeorgiaEast770GeorgiaEast912GeorgiaEast808HawaiiWest
I tried using combinations of  OR and AND but no help in getting desired results.
 

IF

(AND

(OR

(POSTALCODE ="205",POSTALCODE ="251",POSTALCODE ="256",POSTALCODE ="334"),(State ="Alabama"),"East",

(POSTALCODE ="907",POSTALCODE ="480",POSTALCODE ="520",POSTALCODE ="602"),(State ="Arizona"),"West"

)

)

Am end up getting errors while running this syntax.
 
Any clues on this would save my day :-)
 
Regrds,
manish