+ Start a Discussion
rentalforcerentalforce 

newbie can't create new event

hi - i am trying to create a new event as follows. the problem i am having is that it is successful according to save result array however no event is created. since there is no error reported, i have no clue what is wrong. any pointer is appreciated. thanks.

 

 

        Calendar now = Calendar.getInstance();

        Event e = new Event();

        e.setActivityDateTime(now);

        e.setSubject("Call");

        e.setIsAllDayEvent(false);

        e.setDurationInMinutes(new Integer(5));

     e.setWhoId(c.getId()); // here i have verified that i have a valid contact "c"

    SaveResult[] sr = binding.create(new Event[]{ e }); // here sr.success = true and errors = null