• Resolved thepiweb

    (@thepiweb)


    Hi,

    I am trying to bind a form on a page with emailaddress1. I am using
    [msdyncrm_form entity=”contact” name=”Form name” mode=”readonly” hide_form=”false” parameter_name=”id”]
    The dynamics developers I am working with have made available emailaddress1 as a key attribute. So I can choose this instead of ID in the Parameter Name option of Data Binding box. But I can’t get it to work.
    Trying a url with query string like ?id=test%40test.com returns the form blank.
    Using GUID on the other hand works fine even if I have selected email as a parameter name.

    Am I doing something wrong?

    Thanks

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

    (@alexacrm)

    Hi @thepiweb,

    I’d need to confirm it with devs but I don’t think we support the alternate keys as query parameters yet.

    Cheers
    George

    Thread Starter thepiweb

    (@thepiweb)

    Hi George,

    This certain excerpt from the docs gave me the impression that is manageable:

    Parameter name ->
    Entity attribute to match the page against. ID is available for every entity. You can create custom key attributes for specific entities (e.g. email, SKU, etc.).

    Anyway what I am trying to do is have users being able to access/read their records through the front end. I can’t think of a way using the GUID. If we can’t do it with binding the way I am trying could you suggest how we can do such a thing?

    Thanks

    • This reply was modified 6 years, 4 months ago by thepiweb.
    Plugin Author alexacrm

    (@alexacrm)

    Hi @thepiweb

    you quoted documentation about page binding. I just tested it – works as advertised. If alternate key is defined, you may want to regenerate metadata (on Connection tab), and then you need to set the following:

    • Entity: Contact
    • Parameter name: Email (emailaddress1)
    • Query string parameter name: email

    If you don’t see emailaddress1 in a dropdown for Parameter name, it means alternate key is either not defined or not activated (e.g. because you have duplicates).

    Once above is set, page can be referred to as [email protected]

    After page is bound, you can display whatever’s needed on that page using twig syntax. Current record will be available as a twig object.

    Do I understand correctly that you want to grant users access to the records without any authentication? Honestly, I don’t believe it’s a good idea. I would consider authenticating and after that accessing self-records is a very simple exercise

    Thanks

    Thread Starter thepiweb

    (@thepiweb)

    Hi,

    Yes with twig I was able to get bounded data. Thanks.
    Authentication I believe is in the premium package and our client is really reluctant so far to go for.
    We are trying to go somewhere in the middle where a user will be able to see a “safe” lets say part of his record and only change certain minor fields.

    Thanks again

    Thread Starter thepiweb

    (@thepiweb)

    Hi again,

    I am able to get bounded data with [msdyncrm_twig] using “currentrecord”.
    I can’t find the way to use the “record” attribute so I can fill a form’s fields with bounded data as I believe is specified on documentation.
    https://docs.alexacrm.com/wpcrm/twig/

    record – entity record object to fill form fields from, can be retrieved via currentrecord or entities objects, or a GUID

    I am trying using sth like this:

    {% form entity="contact" mode="edit" record="currentrecord" name="my contact" %}
    
    {% endform %}

    Thanks

    Plugin Author alexacrm

    (@alexacrm)

    Hi @thepiweb,

    currentrecord in twig is an object, try using it as the following:

    
    {% form entity="contact" mode="edit" record=currentrecord name="my contact" %}
    {% endform %}
    

    or

    
    {% form entity="contact" mode="edit" record=currentrecord.id name="my contact" %}
    {% endform %}
    

    Thanks

    • This reply was modified 6 years, 4 months ago by alexacrm.
    Thread Starter thepiweb

    (@thepiweb)

    I had tried just currentrecord as an object, without the quotation marks, but didn’t and doesn’t seem to work.

    Yet `currentrecord.id’ did work. I remembered trying it but it may got in the middle changing quotations off and on.

    Thanks again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Binding form with custom email key attribute’ is closed to new replies.