• cdol
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hello,

 

I've followed a few pointers and tutorials around the web for the task I am trying to complete, but nothing has worked so far.

 

I've added what I believe to be the necessary SDK components to my XCode Project (still using 4.3, not 5.0 for iOS 7). I've setup a new view controller and included it in my navigation controller. This view is for a new 'Settings' page I am trying to create.

 

Currently user authentication works just fine with the authenticator view. However, this is the class I am using to try and output data to three labels after login and navigation to the Settings view: 

 

#import "SQSettingsViewController.h"
#import "SFAccountManager.h"
#import "SFIdentityData.h"

@interface SQSettingsViewController ()

@end

@implementation SQSettingsViewController

@synthesize salesforceFirstName, salesforceLastName, salesforceUsername, firstNameLabel, lastNameLabel, usernameLabel;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    salesforceUsername = [SFAccountManager sharedInstance].idData.username;
    salesforceFirstName = [SFAccountManager sharedInstance].idData.firstName;
    salesforceLastName = [SFAccountManager sharedInstance].idData.lastName;
    firstNameLabel.text = salesforceFirstName;
    lastNameLabel.text = salesforceLastName;
    usernameLabel.text = salesforceUsername;
    
    NSLog(@"Username: %@, first name: %@, Last Name: %@", salesforceUsername, salesforceFirstName, salesforceLastName);
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

 

And the output I get in my console: 

 

2013-07-29 08:44:28.099 Sequoia[26397:c07] SFOAuthCoordinator:authenticate: authenticating as REDACTED.REDACTED.REDACTED.REDACTED with refresh token on 'https://login.salesforce.com' ...
2013-07-29 08:44:28.342 Sequoia[26397:c07] oauthCoordinatorDidAuthenticate for userId: REDACTED
2013-07-29 08:44:32.738 Sequoia[26397:c07] Username: (null), first name: (null), Last Name: (null)

 

Any pointers here? I'm at a loss because the only thing I see for REST API usage is SFIdentityData... a little confused! Any help is appriciated!

 

Thank you!

 

  • July 29, 2013
  • Like
  • 0

Hello,

 

I'm totally new to Apex Triggers, but I believe I have a good mental map of what needs to happen to overcome my 'issue'.

 

I have Opportunity (1-1 with Accounts for our org), Sequoia_Service_Level__c, and Accounting__c objects. I'd like to 'call' the trigger by way of a button, since I need to create all Accounting__c records before executing this logic.

 

I need to take the total count of Accounting__c records in the given month, and pro-rate an amount found on the Opportunity (called Revenue_Opportunity__c, which is a roll-up summary of the field "Total_Invoice_Amount__c" on the Current_Service_Level__c object).

 

For instance, if I had 3 Accounting__c records, with a Revenue_Opportunity__c of $10 from the related Opportunity object, each accounting object would be given the value 3.3333... Then, that 3.333 should be set to the field Accounting__c.Baseline_Service_Amount__c.

 

Accounting__c objects have a lookup relationship to Opportunities and Accounts, and all have a related Sequoia_Service_Level__c as well.

 

Is this pretty straightforward stuff? Or will this be quite difficult? I'm already finding invoices for the current month via a report (which is then PDF'd using CongaComposer), but I figured I could not take advantage of that with an Apex Trigger?

 

Any guidance is appriciated!

 

Charlie

 

  • May 14, 2013
  • Like
  • 0

Hello - Not quite sure if the title is most applicable, but here is the issue my team is having.

 

Our iOS app uses Core Location to identify a street address. It then searches for that street address in Salesforce, under both the Leads and the Accounts. Data can be input on the device, and then the information is uploaded back to Salesforce.

 

We normally don't get issues with the app, however, and this is the real kicker - it refuses to work in our main office.

 

Does anyone have any pointers as to what may be causing the error? I've included the Console output below. Sorry if it is more than what is required. 

 

Mar  5 15:19:27 Redacted-Name-iPad Sequoia[9181] <Warning>: (
	    "<SFAccount: 0x1e034c10> (entity: SFAccount; id: 0x1e07f900 <x-coredata&colon;//B05E5782-65F4-4EBB-9E68-F4E8D2C173FA/SFAccount/p5> ; data&colon; <fault>)"
	)
Mar  5 15:19:29 Redacted-Name-iPad Sequoia[9181] <Warning>: is connected: 1
Mar  5 15:19:29 Redacted-Name-iPad Sequoia[9181] <Warning>: SFRestAPI::send: <SFRestRequest 0x1e0506d0 
	endpoint: /services/data 
	method: GET 
	path: /v23.0/query 
	queryParams: {
	  "q" : "SELECT ID, Company, Name, Street, City, State, PostalCode, Phone FROM Lead WHERE PostalCode = '15238' AND Street LIKE '90 Beta_%' AND City = 'O'Hara Township' AND State = 'PA'"
	} 
	>
Mar  5 15:19:29 Redacted-Name-iPad Sequoia[9181] <Warning>: error: Error Domain=com.salesforce.RestAPI.ErrorDomain Code=999 "The operation couldn’t be completed. (com.salesforce.RestAPI.ErrorDomain error 999.)" UserInfo=0x1e0ac010 {message=
	'O'Hara Township' AND State = 'PA'
	                                 ^
	ERROR at Row:1:Column:175
	line 1:175 mismatched character '<EOF>' expecting ''', errorCode=MALFORMED_QUERY}
Mar  5 15:19:29 Redacted-Name-iPad Sequoia[9181] <Warning>: request:didFailLoadWithError: Error Domain=com.salesforce.RestAPI.ErrorDomain Code=999 "The operation couldn’t be completed. (com.salesforce.RestAPI.ErrorDomain error 999.)" UserInfo=0x1e0ac010 {message=
	'O'Hara Township' AND State = 'PA'
	                                 ^
	ERROR at Row:1:Column:175
	line 1:175 mismatched character '<EOF>' expecting ''', errorCode=MALFORMED_QUERY}
Sequoia[9181] <Warning>: (
	)
Mar  5 15:26:47 Redacted-Name-iPad locationd[46] <Notice>: received EBUSY, try kScanTypeChannel, channel, 153, rssi -60, delayed 0.000s
Mar  5 15:26:51 Redacted-Name-iPad Sequoia[9181] <Warning>: (
	    "<SFAccount: 0x1e034c10> (entity: SFAccount; id: 0x1e07f900 <x-coredata&colon;//B05E5782-65F4-4EBB-9E68-F4E8D2C173FA/SFAccount/p5> ; data&colon; {\n    accountType = Prospect;\n    autoRenewTerm = nil;\n    billingCity = nil;\n    billingState = nil;\n    billingStreetAddress = nil;\n    billingZIP = nil;\n    businessName = \"Brock's Account\";\n    contact = \"0x1cde1c30 <x-coredata&colon;//B05E5782-65F4-4EBB-9E68-F4E8D2C173FA/Contact/p5>\";\n    contractDate = \"2013-01-18 05:00:00 +0000\";\n    contractSignatureImageURL = nil;\n    contractTerm = nil;\n    createdContactID = nil;\n    createdContractURL = nil;\n    currentHauler = nil;\n    dateCreated = \"2013-03-05 19:40:22 +0000\";\n    dateModified = nil;\n    latitude = 0;\n    longitude = 0;\n    opportunity = \"0x1cd99420 <x-coredata&colon;//B05E5782-65F4-4EBB-9E68-F4E8D2C173FA/Opportunity/p5>\";\n    sfID = 001U000000Vm4LAIAZ;\n    shippingCity = \"O'Hara Township\";\n    shippingState = PA;\n    shippingStreetAddress = \"90 Beta Dr\";\n    shippingZIP = 15238;\n})"
	)

 

 

  • March 05, 2013
  • Like
  • 0

Hello,

 

I've just hit the 1000 VF record limit on a page where I pull all my organization's accounts, to then tie them to contacts.

 

The page is used to organize a heirarchy of our client portfolios, so that my employees can easily tie descision makers to the proper accounts. For instance, if the client has a regional and local manager, the regional manager would be tied to 100 accounts, and the local manager tied to only 1 or 2 accounts. 

 

Right now, we have a custom field on an Account called Billing Contact. This is the contact related to that location. 

 

In our Org, we have a very accurate Parent/Child account hierarchy. For instance, if Hilton Hotels was a client of ours, there is a 'Hilton Parent' account, and then hundreds/thousands of Accounts that have 'Hilton Parent' account listed as their parent. Also, contacts are only ever listed as Billing Contacts in one hierarchy structure. For instance, 'Jane Doe' is never going to be listed as the Billing Contact for a Marriot Hotel, or any other account outside the Hilton Parent/Child tree.

 

So here is what I'd like to do, but given my generally poor SOQL knowledge, I'm struggling:

 

1) Find an Account that the contact is listed as the BIlling Contact for. 

2) Find the Parent Account of that Account

3) Display ALL child accounts of that parent account. 

 

If anyone has an example to lead me towards, I'd appriciate it! 

 

Charlie

  • November 19, 2012
  • Like
  • 0

Community,

 

I've been trying to set up a data sync job between Salesforce and a MySQL database hosted on Amazon's RDS using Talend, but I've been running into some issues.

 

I just want to check - is this supported/approved? Or is there a silient block in place to make this impossible? 

 

Thanks,

 

Charlie

  • September 27, 2012
  • Like
  • 0

Hello,

 

I've followed a few pointers and tutorials around the web for the task I am trying to complete, but nothing has worked so far.

 

I've added what I believe to be the necessary SDK components to my XCode Project (still using 4.3, not 5.0 for iOS 7). I've setup a new view controller and included it in my navigation controller. This view is for a new 'Settings' page I am trying to create.

 

Currently user authentication works just fine with the authenticator view. However, this is the class I am using to try and output data to three labels after login and navigation to the Settings view: 

 

#import "SQSettingsViewController.h"
#import "SFAccountManager.h"
#import "SFIdentityData.h"

@interface SQSettingsViewController ()

@end

@implementation SQSettingsViewController

@synthesize salesforceFirstName, salesforceLastName, salesforceUsername, firstNameLabel, lastNameLabel, usernameLabel;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    salesforceUsername = [SFAccountManager sharedInstance].idData.username;
    salesforceFirstName = [SFAccountManager sharedInstance].idData.firstName;
    salesforceLastName = [SFAccountManager sharedInstance].idData.lastName;
    firstNameLabel.text = salesforceFirstName;
    lastNameLabel.text = salesforceLastName;
    usernameLabel.text = salesforceUsername;
    
    NSLog(@"Username: %@, first name: %@, Last Name: %@", salesforceUsername, salesforceFirstName, salesforceLastName);
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

 

And the output I get in my console: 

 

2013-07-29 08:44:28.099 Sequoia[26397:c07] SFOAuthCoordinator:authenticate: authenticating as REDACTED.REDACTED.REDACTED.REDACTED with refresh token on 'https://login.salesforce.com' ...
2013-07-29 08:44:28.342 Sequoia[26397:c07] oauthCoordinatorDidAuthenticate for userId: REDACTED
2013-07-29 08:44:32.738 Sequoia[26397:c07] Username: (null), first name: (null), Last Name: (null)

 

Any pointers here? I'm at a loss because the only thing I see for REST API usage is SFIdentityData... a little confused! Any help is appriciated!

 

Thank you!

 

  • July 29, 2013
  • Like
  • 0

Hello - Not quite sure if the title is most applicable, but here is the issue my team is having.

 

Our iOS app uses Core Location to identify a street address. It then searches for that street address in Salesforce, under both the Leads and the Accounts. Data can be input on the device, and then the information is uploaded back to Salesforce.

 

We normally don't get issues with the app, however, and this is the real kicker - it refuses to work in our main office.

 

Does anyone have any pointers as to what may be causing the error? I've included the Console output below. Sorry if it is more than what is required. 

 

Mar  5 15:19:27 Redacted-Name-iPad Sequoia[9181] <Warning>: (
	    "<SFAccount: 0x1e034c10> (entity: SFAccount; id: 0x1e07f900 <x-coredata&colon;//B05E5782-65F4-4EBB-9E68-F4E8D2C173FA/SFAccount/p5> ; data&colon; <fault>)"
	)
Mar  5 15:19:29 Redacted-Name-iPad Sequoia[9181] <Warning>: is connected: 1
Mar  5 15:19:29 Redacted-Name-iPad Sequoia[9181] <Warning>: SFRestAPI::send: <SFRestRequest 0x1e0506d0 
	endpoint: /services/data 
	method: GET 
	path: /v23.0/query 
	queryParams: {
	  "q" : "SELECT ID, Company, Name, Street, City, State, PostalCode, Phone FROM Lead WHERE PostalCode = '15238' AND Street LIKE '90 Beta_%' AND City = 'O'Hara Township' AND State = 'PA'"
	} 
	>
Mar  5 15:19:29 Redacted-Name-iPad Sequoia[9181] <Warning>: error: Error Domain=com.salesforce.RestAPI.ErrorDomain Code=999 "The operation couldn’t be completed. (com.salesforce.RestAPI.ErrorDomain error 999.)" UserInfo=0x1e0ac010 {message=
	'O'Hara Township' AND State = 'PA'
	                                 ^
	ERROR at Row:1:Column:175
	line 1:175 mismatched character '<EOF>' expecting ''', errorCode=MALFORMED_QUERY}
Mar  5 15:19:29 Redacted-Name-iPad Sequoia[9181] <Warning>: request:didFailLoadWithError: Error Domain=com.salesforce.RestAPI.ErrorDomain Code=999 "The operation couldn’t be completed. (com.salesforce.RestAPI.ErrorDomain error 999.)" UserInfo=0x1e0ac010 {message=
	'O'Hara Township' AND State = 'PA'
	                                 ^
	ERROR at Row:1:Column:175
	line 1:175 mismatched character '<EOF>' expecting ''', errorCode=MALFORMED_QUERY}
Sequoia[9181] <Warning>: (
	)
Mar  5 15:26:47 Redacted-Name-iPad locationd[46] <Notice>: received EBUSY, try kScanTypeChannel, channel, 153, rssi -60, delayed 0.000s
Mar  5 15:26:51 Redacted-Name-iPad Sequoia[9181] <Warning>: (
	    "<SFAccount: 0x1e034c10> (entity: SFAccount; id: 0x1e07f900 <x-coredata&colon;//B05E5782-65F4-4EBB-9E68-F4E8D2C173FA/SFAccount/p5> ; data&colon; {\n    accountType = Prospect;\n    autoRenewTerm = nil;\n    billingCity = nil;\n    billingState = nil;\n    billingStreetAddress = nil;\n    billingZIP = nil;\n    businessName = \"Brock's Account\";\n    contact = \"0x1cde1c30 <x-coredata&colon;//B05E5782-65F4-4EBB-9E68-F4E8D2C173FA/Contact/p5>\";\n    contractDate = \"2013-01-18 05:00:00 +0000\";\n    contractSignatureImageURL = nil;\n    contractTerm = nil;\n    createdContactID = nil;\n    createdContractURL = nil;\n    currentHauler = nil;\n    dateCreated = \"2013-03-05 19:40:22 +0000\";\n    dateModified = nil;\n    latitude = 0;\n    longitude = 0;\n    opportunity = \"0x1cd99420 <x-coredata&colon;//B05E5782-65F4-4EBB-9E68-F4E8D2C173FA/Opportunity/p5>\";\n    sfID = 001U000000Vm4LAIAZ;\n    shippingCity = \"O'Hara Township\";\n    shippingState = PA;\n    shippingStreetAddress = \"90 Beta Dr\";\n    shippingZIP = 15238;\n})"
	)

 

 

  • March 05, 2013
  • Like
  • 0

Hi:

I want to display the username in my iOS app so that the user know which account they logged in as (if they have more than one).  I am using the latest SDK and oAuth2.0 flow where the user logs in through the salesfoce UIWebview.  How can I get the username?

Thanks,

Joseph

 

Hello,

 

I've just hit the 1000 VF record limit on a page where I pull all my organization's accounts, to then tie them to contacts.

 

The page is used to organize a heirarchy of our client portfolios, so that my employees can easily tie descision makers to the proper accounts. For instance, if the client has a regional and local manager, the regional manager would be tied to 100 accounts, and the local manager tied to only 1 or 2 accounts. 

 

Right now, we have a custom field on an Account called Billing Contact. This is the contact related to that location. 

 

In our Org, we have a very accurate Parent/Child account hierarchy. For instance, if Hilton Hotels was a client of ours, there is a 'Hilton Parent' account, and then hundreds/thousands of Accounts that have 'Hilton Parent' account listed as their parent. Also, contacts are only ever listed as Billing Contacts in one hierarchy structure. For instance, 'Jane Doe' is never going to be listed as the Billing Contact for a Marriot Hotel, or any other account outside the Hilton Parent/Child tree.

 

So here is what I'd like to do, but given my generally poor SOQL knowledge, I'm struggling:

 

1) Find an Account that the contact is listed as the BIlling Contact for. 

2) Find the Parent Account of that Account

3) Display ALL child accounts of that parent account. 

 

If anyone has an example to lead me towards, I'd appriciate it! 

 

Charlie

  • November 19, 2012
  • Like
  • 0