Find your content:

Search form

You are here

Setting Type of Event or Task via SOAP/REST API

 
Share

I am looking at Object Reference for Event and Task sObjects and seeing that both have Type and Subject. I wanted to use Type as one of meeting, call, email and Subject as event/task title. But, if I try doing that via API, I get response that:

<createResponse>
  <result>
    <errors>
      <fields>Type</fields>
      <message>Event: bad field names on insert/update call: Type</message>
      <statusCode>INVALID_FIELD_FOR_INSERT_UPDATE</statusCode>
    </errors>
    <id xsi:nil=\"true\"/>
    <success>false</success>
  </result>
</createResponse>

And looking at sObject description --- I don't see a Type field there.

Could someone please confirm, that one shouldn't use Type field on both Task and Event sObjects and instead set type using Subject field. In that case, which field one would use for storing email subject?


Attribution to: antonlitvinenko

Possible Suggestion/Solution #1

Type is a valid field for Activities (Tasks & Events), you can see it in the Task Fields & Event Fields list in setup. However it may not be visible to your user profile, check the Field Level Security settings on the field (App Setup > Activities > Task Fields : Type [Set Field-Level Security]).

standard event fields


Attribution to: superfell

Possible Suggestion/Solution #2

Per the SOAP api developer's guide the Type field has the following properties:

Create, Filter, Nillable, Update

so you should be able to change the field. Check the field level security settings for the user you are logged in as.


Attribution to: Greg Grinberg
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/459

My Block Status

My Block Content