Can't add Contact Notes using ContactService.add by java

Hey good guys, for several hours I am stuck at a point. I tried to add “Notes”(below task and appointment) of a contact. Can anyone help me please. I am using java, xml-rpc protocol.
My approach:
List params = new ArrayList();
Map noteData = new HashMap();
noteData.put(“ContactId”, contactId);//my contactId
noteData.put(“ActionDescription”, “Date:11.11.2017\Description”);
noteData.put(“isAppointment”, 1);
noteData.put(“ActionDate”,“20170803T08:00:00”);
noteData.put(“CreationNotes”, “sdfsdfsdfsdfsd12345566777”);
noteData.put(“UserId”,email);//not sure what it should be.

params.add(api_key);
params.add(“ContactAction”);
params.add(noteData);

Integer responseCode = (Integer) client.execute(
“DataService.add”, params);

Note: Thanks guys. I just go through the link reply and tried again adding CompletingDaate. Now it works.

You’re using the field name CreationNotes but in the table it’s called ContactNotes

Actually, using ContactNotes sames notes as person notes in the that particular contact. I am refering the Notes which is below Task/Appts. And this way it works.
Thanks

@John_Boreli,Actually, using ContactNotes saves notes as Person Notes in the that particular contact. I am refering the Notes which is below Task/Appts. For ContactAction the field is CreationNotes [ref] And this way it works.

Thanks

That’s why I’m making the distinction. To populate those notes you have to address a separate table named ContactAction as you have since discovered. Your original post shows attempting to write to the Contact record directly which wouldn’t work.

1 Like