Pass properties to Taxonomy Service in a correct way

Nov 19, 2011 at 7:09 AM
Edited Nov 19, 2011 at 7:11 AM

Hi,

i tried to use to use the Taxonomy Service but no matter what i use to pass the properties to get back the terms i always get the same error.

Error –> "non_object_property_call".

I tried this in certain different ways.
/* Methode 1 */
var
stuffFromTaxStore = $().SPService.GetChildTermsInTermSet(texconfig.SspId, "1033", texconfig.TermSetId);

/* Methode 2 */
var
stuffFromTaxStore = $().SPService.GetChildTermsInTermSet({
                                             sspId: texconfig.SspId,
                                             lcid: "1033",
                                             termSetId: texconfig.TermSetId
                                    });

What is the correct notation for this?

I also read http://spservices.codeplex.com/discussions/274924 it seams that the complete taxonomy service is somehow broken.

It's hard to ping Thomas Zepeda McMillan and no example can be found that works with SPService.

Thanx in advance.
Stefan

Nov 19, 2011 at 9:15 PM

OK the riddle is solved. The correct way to call the Taxonomy Service is:

var stuffFromTaxStore = $().SPServices({
	    	operation: "GetChildTermsInTermSet",
	        "sspId": "{08fe4f9c-dd9a-49c8-bec7-cfd62dec8f88}",
	        "lcid": 1033,
	        "termSetId": "{b162eb49-a9b5-4b70-9e2b-e34a9fab3840}",
	        completefunc: function (xData, Status){
                           /* Do something */
                }
          });

Once i found this out it worked perfect !!!

Kind regards
Stefan 

Coordinator
Nov 20, 2011 at 7:45 PM
Edited Nov 20, 2011 at 7:45 PM

Stefan:

You shouldn't need to put the option names in quotes. In other words:

var stuffFromTaxStore = $().SPServices({
	    operation: "GetChildTermsInTermSet",
	        sspId: "{08fe4f9c-dd9a-49c8-bec7-cfd62dec8f88}",
	        lcid: 1033,
	        termSetId: "{b162eb49-a9b5-4b70-9e2b-e34a9fab3840}",
	        completefunc: function (xData, Status){
                    /* Do something */
                }
          });

M.

Nov 20, 2011 at 8:58 PM

Hi Mark,

Thanx for advise. I tried it without quotation and it worked in both ways.

The problem was more the missing completefunc and how i called it in the previous trys.

Stefan