Required role: | REGISUserRole |
POST | /DynamicsCRM/Activity/Create |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CRMActivityCreateRequest
{
public Integer regent_id = null;
public String lead_guid = null;
public Integer import_id = null;
public String subject = null;
public String description = null;
public String phone_email = null;
public ArrayList<String> email_cc = null;
public String gmail_thread_index = null;
public String related_username = null;
public Date scheduled_start = null;
public Date scheduled_end = null;
public String event_location = null;
public String event_type = null;
public String event_participation = null;
public Boolean is_completed = null;
public Boolean is_contact = null;
public Boolean is_lead = null;
public Boolean is_account = null;
public Boolean is_email = null;
public Boolean is_letter = null;
public Boolean is_phonecall = null;
public Boolean is_task = null;
public Boolean is_meeting = null;
public Boolean is_event = null;
public Date date_of_occurrence = null;
public Date added_date = null;
public Integer getRegentId() { return regent_id; }
public CRMActivityCreateRequest setRegentId(Integer value) { this.regent_id = value; return this; }
public String getLeadGuid() { return lead_guid; }
public CRMActivityCreateRequest setLeadGuid(String value) { this.lead_guid = value; return this; }
public Integer getImportId() { return import_id; }
public CRMActivityCreateRequest setImportId(Integer value) { this.import_id = value; return this; }
public String getSubject() { return subject; }
public CRMActivityCreateRequest setSubject(String value) { this.subject = value; return this; }
public String getDescription() { return description; }
public CRMActivityCreateRequest setDescription(String value) { this.description = value; return this; }
public String getPhoneEmail() { return phone_email; }
public CRMActivityCreateRequest setPhoneEmail(String value) { this.phone_email = value; return this; }
public ArrayList<String> getEmailCc() { return email_cc; }
public CRMActivityCreateRequest setEmailCc(ArrayList<String> value) { this.email_cc = value; return this; }
public String getGmailThreadIndex() { return gmail_thread_index; }
public CRMActivityCreateRequest setGmailThreadIndex(String value) { this.gmail_thread_index = value; return this; }
public String getRelatedUsername() { return related_username; }
public CRMActivityCreateRequest setRelatedUsername(String value) { this.related_username = value; return this; }
public Date getScheduledStart() { return scheduled_start; }
public CRMActivityCreateRequest setScheduledStart(Date value) { this.scheduled_start = value; return this; }
public Date getScheduledEnd() { return scheduled_end; }
public CRMActivityCreateRequest setScheduledEnd(Date value) { this.scheduled_end = value; return this; }
public String getEventLocation() { return event_location; }
public CRMActivityCreateRequest setEventLocation(String value) { this.event_location = value; return this; }
public String getEventType() { return event_type; }
public CRMActivityCreateRequest setEventType(String value) { this.event_type = value; return this; }
public String getEventParticipation() { return event_participation; }
public CRMActivityCreateRequest setEventParticipation(String value) { this.event_participation = value; return this; }
public Boolean getIsCompleted() { return is_completed; }
public CRMActivityCreateRequest setIsCompleted(Boolean value) { this.is_completed = value; return this; }
public Boolean getIsContact() { return is_contact; }
public CRMActivityCreateRequest setIsContact(Boolean value) { this.is_contact = value; return this; }
public Boolean getIsLead() { return is_lead; }
public CRMActivityCreateRequest setIsLead(Boolean value) { this.is_lead = value; return this; }
public Boolean getIsAccount() { return is_account; }
public CRMActivityCreateRequest setIsAccount(Boolean value) { this.is_account = value; return this; }
public Boolean getIsEmail() { return is_email; }
public CRMActivityCreateRequest setIsEmail(Boolean value) { this.is_email = value; return this; }
public Boolean getIsLetter() { return is_letter; }
public CRMActivityCreateRequest setIsLetter(Boolean value) { this.is_letter = value; return this; }
public Boolean getIsPhonecall() { return is_phonecall; }
public CRMActivityCreateRequest setIsPhonecall(Boolean value) { this.is_phonecall = value; return this; }
public Boolean getIsTask() { return is_task; }
public CRMActivityCreateRequest setIsTask(Boolean value) { this.is_task = value; return this; }
public Boolean getIsMeeting() { return is_meeting; }
public CRMActivityCreateRequest setIsMeeting(Boolean value) { this.is_meeting = value; return this; }
public Boolean getIsEvent() { return is_event; }
public CRMActivityCreateRequest setIsEvent(Boolean value) { this.is_event = value; return this; }
public Date getDateOfOccurrence() { return date_of_occurrence; }
public CRMActivityCreateRequest setDateOfOccurrence(Date value) { this.date_of_occurrence = value; return this; }
public Date getAddedDate() { return added_date; }
public CRMActivityCreateRequest setAddedDate(Date value) { this.added_date = value; return this; }
}
}
Java CRMActivityCreateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /DynamicsCRM/Activity/Create HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CRMActivityCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Requests">
<added_date>0001-01-01T00:00:00</added_date>
<date_of_occurrence>0001-01-01T00:00:00</date_of_occurrence>
<description>String</description>
<email_cc xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</email_cc>
<event_location>String</event_location>
<event_participation>String</event_participation>
<event_type>String</event_type>
<gmail_thread_index>String</gmail_thread_index>
<import_id>0</import_id>
<is_account>false</is_account>
<is_completed>false</is_completed>
<is_contact>false</is_contact>
<is_email>false</is_email>
<is_event>false</is_event>
<is_lead>false</is_lead>
<is_letter>false</is_letter>
<is_meeting>false</is_meeting>
<is_phonecall>false</is_phonecall>
<is_task>false</is_task>
<lead_guid>String</lead_guid>
<phone_email>String</phone_email>
<regent_id>0</regent_id>
<related_username>String</related_username>
<scheduled_end>0001-01-01T00:00:00</scheduled_end>
<scheduled_start>0001-01-01T00:00:00</scheduled_start>
<subject>String</subject>
</CRMActivityCreateRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types"> <ErrorCode>String</ErrorCode> <Message>String</Message> <StackTrace>String</StackTrace> <Errors> <ResponseError> <ErrorCode>String</ErrorCode> <FieldName>String</FieldName> <Message>String</Message> <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringstring> <d4p1:Key>String</d4p1:Key> <d4p1:Value>String</d4p1:Value> </d4p1:KeyValueOfstringstring> </Meta> </ResponseError> </Errors> <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringstring> <d2p1:Key>String</d2p1:Key> <d2p1:Value>String</d2p1:Value> </d2p1:KeyValueOfstringstring> </Meta> </ResponseStatus>