• Resolved rodvanlove

    (@rodvanlove)


    Is it possible to default a lookup value on a [msdyncrm_form]?

    I am using the format

    default='{leadsourcecode:Web}{"nls_siteid":{"LogicalName":"site","Id":"4572D4BC-CB38-E811-80F7-005056AC278B","DisplayName":"Birmingham"}}'

    The leadsourcecode works correctly but the nls_siteid does not.I have checked the ID is correct.

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

    (@alexacrm)

    Hi @rodvanlove

    I’m surprised that it’s working for leadsourcecode because the value for optionset is an integer. The syntax you’re trying to use is twig form syntax and not the shortcode.

    Shortcode
    default="{leadsourcecode:3}{nls_siteid:4572D4BC-CB38-E811-80F7-005056AC278B}"

    Twig syntax
    In twig, default value is a json map so the syntax would be as following:
    {% form ... default='{"leadsourcecode":3, "nls_siteid":{"LogicalName":"site","Id":"4572D4BC-CB38-E811-80F7-005056AC278B","DisplayName":"Birmingham"}}' ... %}

    HTH
    George

    • This reply was modified 4 years, 9 months ago by alexacrm.
    Thread Starter rodvanlove

    (@rodvanlove)

    Thanks! That works.

    Yes leadsource code works using the label

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Default Lookup Value’ is closed to new replies.