2

I am creating iOS application with the integration of SalesForce. I have created Xcode project with steps mentioned. I am able to get list of Leads, Contacts, Account, etc.

I have one more feature regarding conversion of Leads into Opportunity. I'm searching for SOQL using which I can make this feature in work.

But not able to find out the correct way of doing this or link using which I can get it.

I found convertLead() but somehow I'm not getting it.

In my application, I am showing list of Leads and on selection of one lead I have given ability to user to convert it into Opportunity. I have shown form with the fields which are mandatory while conversion. But what will the SOQL for it?

Any one have idea about it? Where can I get information related to Saleforce sdk for iOS?

Thank you

user1988
  • 811
  • 2
  • 8
  • 17
  • Some iOS/SF info here: https://events.developerforce.com/en/events/webinars/mobile-sdk-ios – Robert Oct 30 '13 at 11:54
  • Thank you for the quick response but I have gone through this pdf but could not find answer for my question. I have setup my code base using that pdf itself. – user1988 Oct 30 '13 at 12:00
  • Perhaps here?: http://www.kohactive.com/blog/using-the-salesforce-mobile-sdk-on-ios-without-it-taking-over-your-app – Robert Oct 30 '13 at 12:18
  • Noop.. He has mentioned about basic things only :( – user1988 Oct 30 '13 at 12:22
  • By the way you can ask Salesforce questions directly on [salesforce.stackexchange.com](http://salesforce.stackexchange.com/) – mast0r Oct 31 '13 at 10:09

1 Answers1

0

You can build a custom Apex REST web service, and call that to convert your Lead:

https://success.salesforce.com/answers?id=90630000000hLeeAAE

Then build an SFRestRequest and set it's endpoint to your service

SFRestRequest *request = [SFRestRequest requestWithMethod:SFRestMethodPOST path:@"" queryParams:nil];
request.endpoint = @"/services/apexrest/{your endpoint}/{a lead Id}";
[[SFRestAPI sharedInstance] sendRESTRequest:request failBlock:^(NSError *e){
            NSLog(@"error: %@", e);
        } completeBlock:^(id success){
            NSLog(@"success: %@", success);
        }];

convertLead() is available in the SOAP API. I don't think it is possible to call convertLead directly from the REST API. If you'd like to use the SOAP API in your iOS application, use this library:

https://github.com/superfell/zksforce

vreeder
  • 51
  • 2