Hello community,
i started to create my own power apps portals frem blank portal and i'm struggling with few issues at the moment:
1. My javascript code won't runs, i wrot really simple html and javascript jquery code, that works alone but after pasting it to potals source code js stop working:
HTML:
<h1>Current weather</h1>
<label for="fcity">City:</label>
<input type="text" id="fcity" name="fcity"></input> <br><br>
<button id="actionButton" style="width: 80px; height: 30px" type="button">Click</button>
<div id="result" style="display: none">
<div>
<img id="conditionsImage" src="http://cdn.weatherapi.com/weather/64x64/day/116.png" />
</div>
<div id="conditions"></div>
<div id="temperature">Temperature: <strong>...</strong> C</div>
<div><a href="#" class="hide">Hide</a>
</div>
JS:
$(document).ready(function() {
$("#actionButton").click(function() {
console.log("Happend or not?");
getWeather();
});
function getWeather() {
var city = $("#fcity").val();
$.ajax("https://api.weatherapi.com/v1/current.json?key=177d606bb4b9404cabc105906201211&q=" + city, {
dataType: 'json',
success: function(json) {
console.log("It's happend");
$("#conditionsImage").attr("src", "https:" + json.current.condition.icon);
$("div#temperature strong").text(json.current.temp_c);
$("div#conditions").text(json.current.condition.text);
$('#result').show();
},
error: function(json) {
console.log(json);
}
});
}
$('a.hide').click(function(e) {
$('#result').hide();
})
});
When i run this html as just standalone html files everything works, after pasting it to portal it stop working. Html looks fine but but after click on button nothing happen (even consol logs won't appear on console). I try to paste javascript directly into source code in <script> tags and also as a custom javascript to Web Page from Portal Management app. Both approaches failed. Should i enable custom javascript somehow or create some site settings ?
2. I have created List from my custom CDS entity, on list cotntrol i want to enable all actions create/view/edit and delete. But Only Create and View appear, edit/delet are not visible i don't now why. My List options configuration in portal managment app looks like that:

But in browser when i run portal i show only View action, i'm on global amdin account so i shoul had all permision to edit and delete entities:

3. This is rather question than issue, when i click on Show action i'm redicrect to another page, CDS Id is passed as query parameter: /services/product-a/?id=4fe7b456-1424-eb11-a813-000d3a25e75a
How to use this Id to get and display CDS entities fields on this page i should use liquid or javascript to display CDS entity fields, you know any tutorial or documaentation hwo to correctyl implement this view page ?
Let me know if you need better clarification.
Thanks a lot