RE: Payment Gateway in CRM Portals
Hi Rizvan,
I strongly believe that I have over-complicated the things, but you can follow next pattern.
Every webform has associated sessions (adx_webformsession) which hold list of all submitted and in-process web-form-steps.
So you can configure the form to allow only auth users to use it.
Than for the form page you can use Page template with webtemplate type.
I put here liquid with many "debug" information:
{% extends 'Layout 1 COlumn' %}
{% block main %}
{% webform id: page.adx_webform.id %}
<hr>
webformid:: {{ page.adx_webform.id }}
<hr>
userid {{ user.id }}
<hr>
{% fetchxml sesres %}
<fetch mapping="logical" top="1" returntotalrecordcount="true">
<entity name="adx_webformsession" >
<attribute name="adx_primaryrecordid" />
<attribute name="adx_primaryrecordentitylogicalname" />
<filter type="and" >
<condition attribute="adx_webform" operator="eq" value="{{ page.adx_webform.id }}" />
<condition attribute="adx_contact" operator="eq" value="{{ user.id }}" />
</filter>
<order attribute="createdon" descending="true" />
</entity>
</fetch>
{% endfetchxml %}
<pre>
{{ sesres.xml | escape }}
</pre>
<hr>
Sessions ({{sesres.results.total_record_count}}) :
<br>
{% for s1 in sesres.results.entities %}
{{ s1.adx_primaryrecordentitylogicalname }}::{{ s1.adx_primaryrecordid }}<br>
<br>
{% endfor %}
{% endblock %}
As well you need add entitiypermission for Global scope Read right for auth users for adx_webformsession entity.
My test page gives me desired result:
As you can see I created web form for account entity and there its resulting id.
Hope it helps.