I have added a AttributeExternalKey field linked to a AttributeExternalField field.
The Key is a filter to the current Organization 'in production' contracts.
The Field is a link between Contract ID and its Name.
In the console portal all works perfectly. The field is, by default, empty and when the Organization is selected the field is populated with the correct contracts.
But in the enhanced customer portal, I do not managed to show this field on the request form.
Indeed, when I add it, the form redirect to a 404 error.
The XML fields:
<fieldid="contract_id"xsi:type="AttributeExternalKey"_delta="define"><filter><![CDATA[ SELECT Contract AS C WHERE C.org_id = :this->org_id AND C.status = 'production' ]]></filter><dependencies><attributeid="org_id"/></dependencies><sql>contract_id</sql><target_class>Contract</target_class><is_null_allowed>false</is_null_allowed><on_target_delete>DEL_MANUAL</on_target_delete><allow_target_creation>false</allow_target_creation><display_style>list</display_style></field><fieldid="contract_name"xsi:type="AttributeExternalField"_delta="define"><extkey_attcode>contract_id</extkey_attcode><target_attcode>name</target_attcode></field>
Hi Kevin
I have the feeling to have seen a kind of limitation by which you cannot define a dependency on a field which is not present in the form. Could you try to add the "org_id" in the form, in read only if you want, (maybe in hidden, it might work as well, but less sure..)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is the Portal User allowed to see the remote object through his scopes?
Some customer reported a similar issue when an object is pointing to an archived object, then the Portal is no more able to display the container object. That could be the same cause.
Last edit: Vincent @ Combodo 2022-09-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello to all !
I have added a AttributeExternalKey field linked to a AttributeExternalField field.
The Key is a filter to the current Organization 'in production' contracts.
The Field is a link between Contract ID and its Name.
In the console portal all works perfectly. The field is, by default, empty and when the Organization is selected the field is populated with the correct contracts.
But in the enhanced customer portal, I do not managed to show this field on the request form.
Indeed, when I add it, the form redirect to a 404 error.
The XML fields:
The form Twig:
You could see the error on attachment.
Error translation:
Page not found
Sorry this object does not exist (or you are not authorized to display it)
Kind regards,
Last edit: Kevin 2022-09-14
Hi Kevin
I have the feeling to have seen a kind of limitation by which you cannot define a dependency on a field which is not present in the form. Could you try to add the "org_id" in the form, in read only if you want, (maybe in hidden, it might work as well, but less sure..)
Hi Vincent,
Thank you for your answer. I have tried your solution without result.
I have the same 404 error...
Kind regards,
Is the Portal User allowed to see the remote object through his scopes?
Some customer reported a similar issue when an object is pointing to an archived object, then the Portal is no more able to display the container object. That could be the same cause.
Last edit: Vincent @ Combodo 2022-09-15