Post

1 follower Follow
0
Avatar

insert template to project by clarizen API

Hi,

I need to add template while creating project through clarizen API in PHP code. Please help with a code snippet.

 

Thanks,

Shivani

Shivani Gupta Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hi,

 

Thanks for the response. Its working fine. Another thing, Can we fetch template names from API? What will be field type? I am trying t run below query:

 

   $LeftParent = array(

            "FieldName" => "TemplateName");

        $RightParent = array("Value" => null);

        $ParentCondition = array(

            "LeftExpression" => new SoapVar($LeftParent, SOAP_ENC_OBJECT, "FieldExpression", "http://clarizen.com/api/queries"),

            "Operator" => "NotEqual",

            "RightExpression" => new SoapVar($RightParent, SOAP_ENC_OBJECT, "ConstantExpression", "http://clarizen.com/api/queries"));

        $params = array(

            "Fields" => array("TemplateName"),

            "TypeName" => "Project  ",

            "Where" => new SoapVar($ParentCondition, SOAP_ENC_OBJECT, "Compare", "http://clarizen.com/api/queries"),

            "Paging" => array(

                "PageNumber" => 0,

                "PageSize" => 1000

            )

        );

Please help!

 

Thanks,

Shivani

 

Shivani Gupta 0 votes
Comment actions Permalink
0
Avatar

Hi Shivani.

To get Template names, just send an EntityQuery with a TypeName of "Template" (obviously, specify Name in the Fields collection).

Hope this helps,

Ophir

Ophir Kenig 0 votes
Comment actions Permalink