Post

2 followers Follow
0
Avatar

get Calendar exceptions via SOAP

I need to get all the calendar exceptions for a particular duration for a user using SOAP API. Can i get a sample call ?

Deeksha Shetty Answered

Official comment

Avatar

Hi Deeksha,

Here is an example:

var entityQuery = new EntityQuery
{
TypeName = "CalendarException",
Fields = new[] { "Name", "EntityType", "ExceptionType", "EventCalendar" },
Where = new And
{
Conditions = new Condition[]
{
new Compare
{
LeftExpression = new FieldExpression{FieldName = "EventCalendar"},
Operator = Operator.In,
RightExpression = new QueryExpression
{
Query = new EntityQuery
{
TypeName = "User",
Fields = new[] {"ExternalId"},
Where = new Compare
{
LeftExpression = new FieldExpression{FieldName = "ExternalId" },
Operator = Operator.Equal,
RightExpression = new ConstantExpression { Value = "5237vi7an4xa5m7dek3zwomzj1926" }
}
}
}
},
new Compare
{
LeftExpression = new FieldExpression{FieldName = "StartDate"},
Operator = Operator.GreaterThan,
RightExpression = new ConstantExpression{Value = "2018-09-1"}
}
}
}
};

 

I hope this helps,

Elad

Elad Franklin
Comment actions Permalink

Please sign in to leave a comment.

3 comments

0
Avatar

Hi Elad,

 

This helps.Thank you. 

But i figured out that there are other typenames in Clarizen which i am not able to see under Settings>>Configure.

I want to be able to see all the typenames and all the columns for it. Is this possible and how ?

Deeksha Shetty 0 votes
Comment actions Permalink
0
Avatar

Hi,

You can use the "ListEntitiesMessage" to get all enity types.

For each type you can then use the "DescribeEntitiesMessage" to get all relevant fields.

 

I hope this helps,

Elad

Elad Franklin 0 votes
Comment actions Permalink