Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
JShare
>
Tutorial
> Create list item
The following example shows you how to create a list item.
import com.independentsoft.share.ListItem; import com.independentsoft.share.Service; import com.independentsoft.share.ServiceException; public class Example { public static void main(String[] args) { try { Service service = new Service("https://independentsoft.sharepoint.com", "username", "password"); ListItem item = new ListItem("Column1"); ListItem createdItem = service.createListItem("dbf4c193-34ee-4719-901e-4f2aa290883a", item); System.out.println("Id: " + createdItem.getId()); } catch (ServiceException ex) { System.out.println("Error: " + ex.getMessage()); System.out.println("Error: " + ex.getErrorCode()); System.out.println("Error: " + ex.getErrorString()); System.out.println("Error: " + ex.getRequestUrl()); ex.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*