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
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 7 years, 6 months ago by
thepiweb.
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
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
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
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 7 years, 5 months ago by
alexacrm.
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.