function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ila pambharila pambhar 

I am not able to add lead in Non enterprise (Trail account)account using API

Hello everyone,

I need help it's urgent so please reply as soon as possible.
I am using below code to add lead from .net website to Salesforce.
Code Structure :

            var uri = this.Instant_url + "/services/data/v33.0/sobjects/Lead/";
            var acct = new sObjectLead();
            acct.FirstName = shruti;
            acct.LastName =Patel;
            acct.Company = IBM;
            acct.LeadSource = "Scout";
            acct.Email = shruti121@gmail.com;
            acct.Phone = 9256362563;
            acct.Title = "Test"

            var ser = new JavaScriptSerializer();
            var body = ser.Serialize(acct);
            var req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(uri);

            req.Headers.Add("Authorization: OAuth " + this.access_token);
            req.ContentType = "application/json";
            req.Method = "POST";

            byte[] data = System.Text.Encoding.ASCII.GetBytes(body);
            req.ContentLength = body.Length;
            var os = req.GetRequestStream();
            os.Write(data, 0, data.Length);
            os.Close();

I am able to add lead in Development account & Enterprise account. Is it possible to add lead in nonenterprise account?If yes, then please tell me how can i add ?
 Can you please suggest me what is the issue in this code ? 

 
Paul (Bonhomie.io)Paul (Bonhomie.io)
Hi,

in the URI = this.Instant_url... when you refer to non-enterprise account are you referring to the org's sandbox? if so is the url pointing to test.salesforce.com?

when your pointing to the dev and enterprise account i'm assuming your instance_url is http://login.salesforce.com
Daniel BallingerDaniel Ballinger
Have a read of What Editions Have API Access? (http://help.salesforce.com/HTViewSolution?id=000005140&language=en_US)

Basically, if it is a Group or Professional Edition org you will need to contact your Account Executive about purchasing the API add on.

The only other option is to have a certified partner application that has gone through the appexchange certification process. Then it gets API access to processional edition orgs using the supplied Client ID.
ila pambharila pambhar
Thank you for reply... As per your suggestion How can i take certified partnership or how i implement.can you please explain deeply?
Daniel BallingerDaniel Ballinger

To become a certified partner application you will need to list your App on the AppExchange. See Build your business faster with the Partner Program for ISV Partners (http://www.salesforce.com/appexchange/list/) and Force.com ISV Security Review (https://developer.salesforce.com/page/Security_Review).

This can be a fairly large undertacking, so you will need to figure out if it is worth the time and effort for your app.