Post

2 followers Follow
0
Avatar

Adding pick list values from our database using API

I want to add pick list values from our database. Does API support this functionlity now?
If not, How can I achieve this?

Thanks

Anil Jadhav Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hi Clarizen team,
I have database list which will be always changing. That's why I want to update pick list values through API calls.
Which API method should I use to update pick list.
It would be great, If you could provide some sample code.

Thanks

Thanks

Anil Jadhav 0 votes
Comment actions Permalink
0
Avatar

For example, if you want to add a new value called "Value1" to the picklist called "BusinessImpact" on the case entity you should simply use the Create operation to do that. In soap this would look like this:

<?xml version="1.0" encoding="utf-16"?>
<BaseMessage xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:q1="http://clarizen.com/api" xsi:type="q1:CreateMessage">
q1:Entity
q1:Id
q1:TypeNameCaseBusinessImpact/q1:TypeName
q1:Valuevalue1/q1:Value
/q1:Id
/q1:Entity
</BaseMessage>

The meaning of the above is:
Insert a new object of type "CaseBusinessImpact" and give this object the ID "value1".

Eyal Post 0 votes
Comment actions Permalink
0
Avatar

Thanks mate. That was helpful.
I am able to update the pick list.

GenericEntity jobcodePicklist = new GenericEntity();
jobcodePicklist.Id = new EntityId() { TypeName = "C_WorkItem_Jobcode", Value = newJobcode };

CreateMessage createJobCodePickList = new CreateMessage() { Entity = jobcodePicklist };
Utils.CheckResponseStatus(clarizen.Execute(new BaseMessage[] { createJobCodePickList }));

Anil Jadhav 0 votes
Comment actions Permalink