Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 123975

Forum Post: RE: How to call CRM web API using portal web form with best practice

$
0
0
You can use what Joseph has proposed with oData and Entity List. But in case you want to output some specific information about case and especially if you need output something from connected entities - it can be quite complicated and require more ajax requests to different odata endpoints. You can use liquid instead. Again, create entity permission for cases (use scope as global - for test period), and allow this permission for authenticated users role. Create page -> which derive from custom page template -> which derive from custom web template: mentioned code output textbox to input text, and allow you to search this text in all cases numbers (you can easily change this condition). As well I have added condition to look in only active cases. This approach didn't do any external/internal ajaxcalls and can be extended for even better security based on current user roles/relationships/data. {% extends "Layout 1 Column" %} {% block main %} {% if request.params["caseid"] %} {%assign caseid = request.params["caseid"] %} {% fetchxml cases %} {% endfetchxml %} {%if cases.results.entities.size > 0 %} Result ({{cases.results.entities.size}}) for search ({{caseid|h}}): {%for e in cases.results.entities %} {{e.title}} ({{e.ticketnumber}}) {%endfor%} {%else%} there are no results {%endif%} {%endif%} {%endblock%}

Viewing all articles
Browse latest Browse all 123975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>