regis

<back to all web services

CRMActivityCreateMultipleRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/DynamicsCRM/Activity/Create/Multiple
import 'package:servicestack/servicestack.dart';

class CRMActivityCreateRequest implements IConvertible
{
    int? regent_id;
    String? lead_guid;
    int? import_id;
    String? subject;
    String? description;
    String? phone_email;
    List<String>? email_cc;
    String? gmail_thread_index;
    String? related_username;
    DateTime? scheduled_start;
    DateTime? scheduled_end;
    String? event_location;
    String? event_type;
    String? event_participation;
    bool? is_completed;
    bool? is_contact;
    bool? is_lead;
    bool? is_account;
    bool? is_email;
    bool? is_letter;
    bool? is_phonecall;
    bool? is_task;
    bool? is_meeting;
    bool? is_event;
    DateTime? date_of_occurrence;
    DateTime? added_date;

    CRMActivityCreateRequest({this.regent_id,this.lead_guid,this.import_id,this.subject,this.description,this.phone_email,this.email_cc,this.gmail_thread_index,this.related_username,this.scheduled_start,this.scheduled_end,this.event_location,this.event_type,this.event_participation,this.is_completed,this.is_contact,this.is_lead,this.is_account,this.is_email,this.is_letter,this.is_phonecall,this.is_task,this.is_meeting,this.is_event,this.date_of_occurrence,this.added_date});
    CRMActivityCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        regent_id = json['regent_id'];
        lead_guid = json['lead_guid'];
        import_id = json['import_id'];
        subject = json['subject'];
        description = json['description'];
        phone_email = json['phone_email'];
        email_cc = JsonConverters.fromJson(json['email_cc'],'List<String>',context!);
        gmail_thread_index = json['gmail_thread_index'];
        related_username = json['related_username'];
        scheduled_start = JsonConverters.fromJson(json['scheduled_start'],'DateTime',context!);
        scheduled_end = JsonConverters.fromJson(json['scheduled_end'],'DateTime',context!);
        event_location = json['event_location'];
        event_type = json['event_type'];
        event_participation = json['event_participation'];
        is_completed = json['is_completed'];
        is_contact = json['is_contact'];
        is_lead = json['is_lead'];
        is_account = json['is_account'];
        is_email = json['is_email'];
        is_letter = json['is_letter'];
        is_phonecall = json['is_phonecall'];
        is_task = json['is_task'];
        is_meeting = json['is_meeting'];
        is_event = json['is_event'];
        date_of_occurrence = JsonConverters.fromJson(json['date_of_occurrence'],'DateTime',context!);
        added_date = JsonConverters.fromJson(json['added_date'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'regent_id': regent_id,
        'lead_guid': lead_guid,
        'import_id': import_id,
        'subject': subject,
        'description': description,
        'phone_email': phone_email,
        'email_cc': JsonConverters.toJson(email_cc,'List<String>',context!),
        'gmail_thread_index': gmail_thread_index,
        'related_username': related_username,
        'scheduled_start': JsonConverters.toJson(scheduled_start,'DateTime',context!),
        'scheduled_end': JsonConverters.toJson(scheduled_end,'DateTime',context!),
        'event_location': event_location,
        'event_type': event_type,
        'event_participation': event_participation,
        'is_completed': is_completed,
        'is_contact': is_contact,
        'is_lead': is_lead,
        'is_account': is_account,
        'is_email': is_email,
        'is_letter': is_letter,
        'is_phonecall': is_phonecall,
        'is_task': is_task,
        'is_meeting': is_meeting,
        'is_event': is_event,
        'date_of_occurrence': JsonConverters.toJson(date_of_occurrence,'DateTime',context!),
        'added_date': JsonConverters.toJson(added_date,'DateTime',context!)
    };

    getTypeName() => "CRMActivityCreateRequest";
    TypeContext? context = _ctx;
}

class CRMActivityCreateMultipleRequest implements IConvertible
{
    bool? is_contact;
    bool? is_account;
    bool? is_event;
    bool? is_email;
    bool? is_meeting;
    bool? is_phonecall;
    bool? is_letter;
    bool? is_task;
    String? related_username;
    List<CRMActivityCreateRequest>? activities;

    CRMActivityCreateMultipleRequest({this.is_contact,this.is_account,this.is_event,this.is_email,this.is_meeting,this.is_phonecall,this.is_letter,this.is_task,this.related_username,this.activities});
    CRMActivityCreateMultipleRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        is_contact = json['is_contact'];
        is_account = json['is_account'];
        is_event = json['is_event'];
        is_email = json['is_email'];
        is_meeting = json['is_meeting'];
        is_phonecall = json['is_phonecall'];
        is_letter = json['is_letter'];
        is_task = json['is_task'];
        related_username = json['related_username'];
        activities = JsonConverters.fromJson(json['activities'],'List<CRMActivityCreateRequest>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'is_contact': is_contact,
        'is_account': is_account,
        'is_event': is_event,
        'is_email': is_email,
        'is_meeting': is_meeting,
        'is_phonecall': is_phonecall,
        'is_letter': is_letter,
        'is_task': is_task,
        'related_username': related_username,
        'activities': JsonConverters.toJson(activities,'List<CRMActivityCreateRequest>',context!)
    };

    getTypeName() => "CRMActivityCreateMultipleRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
    'CRMActivityCreateRequest': TypeInfo(TypeOf.Class, create:() => CRMActivityCreateRequest()),
    'CRMActivityCreateMultipleRequest': TypeInfo(TypeOf.Class, create:() => CRMActivityCreateMultipleRequest()),
    'List<CRMActivityCreateRequest>': TypeInfo(TypeOf.Class, create:() => <CRMActivityCreateRequest>[]),
});

Dart CRMActivityCreateMultipleRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /DynamicsCRM/Activity/Create/Multiple HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CRMActivityCreateMultipleRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.DynamicsCRM.Requests">
  <activities>
    <CRMActivityCreateRequest>
      <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:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1: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>
  </activities>
  <is_account>false</is_account>
  <is_contact>false</is_contact>
  <is_email>false</is_email>
  <is_event>false</is_event>
  <is_letter>false</is_letter>
  <is_meeting>false</is_meeting>
  <is_phonecall>false</is_phonecall>
  <is_task>false</is_task>
  <related_username>String</related_username>
</CRMActivityCreateMultipleRequest>
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>