• Resolved todosmisviajes

    (@todosmisviajes)


    Hello!

    Congratulations for this great plugin!
    I’m working in a webpage with a form linked to D365. Everything works well, but one topic.
    The form has a field “ownerid” I would like to hide this field at the form and send the value direct from the plugin.

    This is my code:

    [msdyncrm_form entity=”lead” name=”formulario_web” mode=”create” captcha=”true” message=”?Gracias por contactarse!” hide_form=”true” default=”{subject:Lead desde landing page}{leadsourcecode:1}{ownerid:????????}”]

    I don’t know where can I find the ownerid linked to each user. Could you help me please?

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

    (@alexacrm)

    Hi @todosmisviajes

    thanks, glad to see it in action!

    I’m not sure what you’re planning to set ownerid to – where are you planning to get the current user who’s working in the portal?

    If you want simply to hardcode the owner, then use guid of the systemuser record, e.g. default="{ownerid:4d7f36d7-5a2e-4b62-965d-970513fcbd50}"

    If you actually want to set the field to the current user, then the plugin would require integrated authentication with Dynamics 365, the feature only available in the Enterprise extension. The code would simply become default="{ownerid:currentuser.id}"

    HTH
    George

    • This reply was modified 7 years, 2 months ago by alexacrm.
    Thread Starter todosmisviajes

    (@todosmisviajes)

    Thanks for your answer George.

    I need the userid just because is mandatory in the form for new leads.

    I tried what you said and I receive this error:

    Unsupported lookup type for [ownerid], or entity {4d7f36d7-5a2e-4b62-965d-970513fcbd50} not found

    Any suggestion?

    Thanks!
    Claudio

    Plugin Author alexacrm

    (@alexacrm)

    Hi Claudio,

    you can’t just use the id I gave you as a sample, it must be an id of a valid system user. If you don’t know how to get one or don’t want to hardcode, there are other options available:

    • In Dynamics 365 add ownerid to the form header, then remove it from the form. We do not render the header so you’ll get the result you’re after while in CRM ownerid is still there
    • Force it to be optional: [msdyncrm_form optional="ownerid" ...] and hide it using css

    HTH
    George

    • This reply was modified 7 years, 2 months ago by alexacrm.
    Thread Starter todosmisviajes

    (@todosmisviajes)

    Excellent! It works perfect.

    I simply move the owner to the header.

    Thank you!

    Claudio

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Where can I see my ownerid?’ is closed to new replies.