Make Frappe Calls in Custom HTML Block Doctype

Has anyone been able to make a frappe call from the javascript section of the Custom HTML Block similar to what was demoed during Frappeverse 2023 which was used to fetch user details? i’m looking to do somethig similar but i don’t know how to achieve this and there’s no documentation on how to do this. Any help will be appreciated.

Hi @flexy2ky:

Try this:

HTML section

<p> Hola! </p>

<div id="info">
    <div class="lang"></div>
    <div class="elvis"></div>

Javascript section:

let info = $(root_element).find("#info");
let lang = frappe.boot.lang

	method: '',
	callback: function(r) {
		console.log("Calling Elvis!")

Hope this helps!


Thank!!! this absolutely helped!