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
kamalkumarkamalkumar 

Calling Custom Objects from JSP..

I am new to salesforce and jsp. I am trying to access a custom object from the jsp but not able to get it. With standard object it's working fine.
 
If someone can send a sample/working jsp code then its appreciated.
 
Thanks.
adamgadamg
You should see some examples on the Wiki, and it should be identical to how you access the standard object (assuming you have generated your WSDL + classes appropriately..)
kamalkumarkamalkumar

Thanks.

If I get a sample code to access custom objects in JSP then it will be great.

SuperfellSuperfell
They all work the same way, take an example that uses account, and replace the references to Account with the name of your custom object + "__c", e.g.

Account a = new Account();
a.setName("foo");
binding.create(new SObject [] {a});

becomes
MyCustomObject__c a = new MyCustomObject__c();
a.setName("bar");
binding.create(new SObject[] {a});

You might want to take the time to walk through the quick start guide.