• Resolved kimineko

    (@kimineko)


    Hi,

    is there an equvialent to the deprecated “lookupviews=”{parentcustomerid:Active Contacts}”? I tried

    <select name=”_ud_countryid_value “>

          {% for ud_country in countries.results.entities %}

                <option value=”{{ ud_country.ud_countryid }}”>{{ud_country.ud_name }}</option>

                {% endfor %}

    ??????</select>#

    which gives me the GUIDSas values and the right labels, but I am not sure about the column name and/or if this approach can work at all.

    From Dynamics:

    [email protected] Finnland

    _ud_countryid_value@Microsoft.Dynamics.CRM.associatednavigationproperty ud_countryid

    [email protected] ud_country

    _ud_countryid_value 246b864b-694d-ee11-be6e-6045bd8c5bf9


    Thank you in advance.

    Best

    Kim

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author alexacrm

    (@alexacrm)

    @kimineko

    try the column logical name <select?name="ud_countryid"> and let us know if it worked.

    Thanks
    AlexaCRM Support

    Thread Starter kimineko

    (@kimineko)

    That does not work either, unfortunately.

    Plugin Author alexacrm

    (@alexacrm)

    Ah, sorry, forgot to add that in addition to the column name as above, the values need to be one of the following:

    • Serialised EntityReference in the format { "LogicalName": "contact", "Id": "00000000-0000-0000-0000-000000000000" }. Easiest way is to use to_entity_reference filter
    • Simplified old-style syntax of table:guid as a value

    Examples

    <select?name="ud_countryid">
       {%?for?ud_country?in?countries.results.entities?%}
          <option?value="{{?ud_country?| to_entity_reference }}">{{ud_country.ud_name?}}</option>
       {%?endfor?%}
    </select>

    OR, simplified syntax

    <select?name="ud_countryid">
       {%?for?ud_country?in?countries.results.entities?%}
          <option?value="ud_country:{{ ud_country.ud_countryid }}">{{ud_country.ud_name?}}</option>
       {%?endfor?%}
    </select>
    Thread Starter kimineko

    (@kimineko)

    Thank you – the simplified syntax worked for me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Form: Lookup as Dropdown’ is closed to new replies.