OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions Add context to calendar event using API or REST

This topic contains 1 reply, has 2 voices, and was last updated by  Yurii Muratov 4 weeks, 1 day ago.

The forum will run in the read-only mode starting from March 1. Please head to StackOverflow for support.

  • Creator
    Topic
  • #41308

    wizhippo
    Participant

    I wish to add a lead to the context of an calendar event.

    I have figured out how to create the lead, but connot figure out how to add the lead to the events context.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #41321

    Yurii Muratov
    Participant

    Hi, @wizhippo.

    Unfortunately, current JSON API has no resource to do this.

    But you can do this with the plain REST API.

    For example, if you want to add the lead with id 10 as the context to the calendar event with id 1, you can send a POST request to the api/rest/latest/activities/calendarevents/1/relations.json API resource (here 1 is the id of calendar event) with data:

    Here 10 is the id of the lead.

    This request should return empty response with 204 status code if the lead was added to the calendar event.

    Please note that request should have Content-Type header with application/json value.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No