This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

API method to filter lookup items based on Filtering Property or Owner?

I Have three Object Types: Country and State where Country Owns State, and Location. I created two Properties, CountryLookup and StateLookupand these are metadata properties of the Location. Am am using the API to populate Locations. The problem I run into is when I need to populate the State, the incoming values are non-unique (ex:FL  for Florida, USA or Flevoland, NLD). So what I need to do is identify that CountriesLookup is the Property on the object that contains the OwnerID, so when I SearchValueListItems, I can see I get two FL results, but that only one is valid for the CountryLookup value.

There are multiple "pairs" of lookups on this object so I am trying to handle this generically. So far it seems very convoluted:

1) Does this PropertyDef's ValueList have an Owner?

2) If Yes, then what other PropertyDef on my object points to the ValueList that holds the Owner values

3) Set OwnerID = the PropertyValue of that other PropertyDef.

This fails when there are two pairs of properties with the same underlying ObjectTypes, example Shipping Address vs Billing Address. I need the Billing State to use the Billing Country and not the Shipping country. I can specify this as a Filter in the property configuration, but I'm not sure how to access that in the API.

Ideas?

Jason

Parents Reply Children
No Data