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
Shing Ho TanShing Ho Tan 

Create Lead and Contact Object in React native using mobile sdk


I would like to create a lead and contact object in react-native using mobile sdk. I already logged in by oauth using mobile sdk.
Please send me example about creating lead and contact object in react-native.

Thank you
Ajay K DubediAjay K Dubedi
Hi Shing,

Take a look at the RestAPIExplorer app. This is a native sample app that gives you a visual interface to create/update/query/delete objects, or run any REST request for that matter, against a Salesforce endpoint. I'm guessing you will need to create an object of type 'Lead' or 'Contact'. 'Contact__c' is a custom object, and I can't really speak to what type of object that is without having metadata of the org you're testing against.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Ajay Dubedi
Shing Ho TanShing Ho Tan
Thank you for your answer.
I checked that and it uses mobile sdk and I want a webview sdk and I can see the oauth login screen and after I login it sends a redirect callback and the app shows "No activity found to handle intent"'.

<activity android:name="com.businesscardscanner.LoginDoneActivity" android:theme="@style/Theme.AppCompat.Light.NoActionBar" android:launchMode="singleInstance"> <intent-filter> <data android:scheme="sfdc" android:host="" android:path="/success" /> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>

But I set the callback url as sfdc:// and over code is my another activity.
Please help me on this problem.
Thank you