So I have an account that contains a bunch of location addresses. I want to display all the addresses of a specific account in my html webpage form, and they get to choose the addresses based on the dropdown menu of it. If they choose that specific address it populates my html field with the chosen address.
Im not sure where to start though
So I have a list of locations in this account and in the html webform, I want it to give a dropdown of all available locations of that specific account. Im trying to find the column name for locations in the customizations but i cant find it.
Hi TheDynamicsMan,
Here are some helpful links:
To query data in HML web resource. Usee below method:
function Retrieve(webAPIVersion, entitysPluralName, fetchXmlQuery) {
//GET[Organization URI]/api/data / v9.0/ EntityDefinitions(LogicalName = 'account') ? $select = DisplayName,IsKnowledgeManagementEnabled, EntitySetName HTTP/ 1.1
//Accept: application / json
//OData - MaxVersion: 4.0
//OData - Version: 4.0
var req = new XMLHttpRequest();
req.open(
"GET",
Xrm.Page.context.getClientUrl() +
"/api/data/" + webAPIVersion + "/" + entitysPluralName + "?fetchXml=" +
encodeURIComponent(fetchXmlQuery),
false
);//Sync
req.setRequestHeader("Prefer", 'odata.include-annotations="*"');
req.onreadystatechange = function () {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 200) {
var results = JSON.parse(this.response);
globalVariables.Results = results.value;
} else {
alert(this.statusText);
}
}
};
req.send();
}