Hello,
I created a page which contains a basic form in insert mode. i need to prefill the fields on the form when it's loaded.
How could i do it?
Thanks.
Regards.
Solved! Go to Solution.
@NatGeo , When talk about WebApi, it's related to xrm webservice call(REST).
So, if i understood. I just have to create a webtemplate and in this webtemplate i make liquid fetch query into this code i create script to populate my form. Lilke this:
{%assign opportunityid=request.params["id"]%}
{%fetchxml opportunities%}
<fetch>
<attribute...>
<filter>
<condition attribute="opportunityid" operator="eq" value = "{{opportunityid}}"..>
</filter>
<endfetch>
{%endfetchxml%}
{%for myopportunity in .......%}
<script>
//should i populate lookup here like this??
$("#...").attr("value", {{myopportunity.contact.name}});
</script>
{%endfor%}
Thanks
Please look at the link:
Custom Lookup filtering on PowerApps Portals - Dancing with CRM
It's great guide.
Hello @NatGeo ,
I don't sure that i really understood, in this guide we have to change the render of the lookup and filter contents right? the things is that in my case i downloaded the custom form from specific table in dataverse. I need on loading to populate lookup fields of this basic form.
Anyway i will test and let you know.
Thanks.
Regards
Hi @NatGeo, Thanks for your explanations. I tried with fetch but i encountered some issues, so now i tried to enabled odata feed functionality and i past through odata to retrieve needed fields and assign corresponding values to my lookups using jquery in custom javascript are of the basic form in additional setting tab.
Now it works.
Thanks for all.
Regards