I'm doing a data import/update using a custom application which works via webservices and I've hit a problem. My import data contains a field called region. That region contains data like:
Sri Lanka
India
There are many more. I use this field to do a lookup on an entity for a record. The problem is that region is a drop down list in CRM called comp_c_tregion and the code is a value like:
A1
B2
The caption codes bear no relationship to the translation. There is a reason for this which is not relevent to this. The problem I have is that when I get given "Sri Lanka" in the input data, I need to do a query over webservices that uses the equivalent caption code instead of the data passed in. I cannot simply hard code this in the application as the data in comp_c_tregion does get added to as new regions come on board. I need the application to be able to dynamically get the data out of metadata but the custom_captions table is not available over web services. I could make the table available over webservices but I don't really want to. There has to be a way of querying metadata over webservices to get the caption code for a given translation.
Does anyone have any idea?
I have queried the value of the drop down directly from the company entity using the idea here: https://community.sagecrm.com/partner_community/b/hints_tips_and_tricks/archive/2008/08/05/selection-lists-in-web-services.aspx
However, as the article points out, the return from getdropdownvalues("company") gives me all the fields and I can do a nested loop to get the values from the required field in there but it gives me the translations only. That is fine, but once I find the translation that matches the value "Sri Lanka" I need to query CRM's metadata to get the capt_code for that translation.
Thanks.