dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39501
How can i access 'form.js' from my data entry screen?
Hi Expert's,
I am trying to access a function in 'form.js' from my data entry screen as:
In form.js:
function openingBalanceData(){
var dataSetId = dhis2.de.currentDataSetId;
console.log(dataSetId);
dhis2.de.currentOrganisationUnitId = selection.getSelected()[0];
console.log(dhis2.de.currentOrganisationUnitId);
var a=10;
console.log(a);
}
In my data entry screen:
------------------------------------------------------------------------------------------
<script>
window.openingBalanceData();
</script>
------------------------------------------------------------------------------------------
What is the problem in my script or can i not call from data entry screen?
Waiting for your valuable opinion.
Thanks
Julhas
Dhaka, Bangladesh
Follow ups