Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Create a table in the section of an account form with respective to the contacts of that specific account

$
0
0

Hi, 

I have created a table which shows rows and columns dynamically on the "account form" through html webresource usingscript=JAVASCRIPT.. Now i want to show the table in such  a way that the number of columns shouls be 3 .. and number of rows should be equal to the number of contacts related to that specific account and cell name shouls be contact name..

I need help on how to do this...

This is the code which iam using and i need to modify this according to the above requirement

<!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8" /><title>Add dynamic rows in HTML table </title><script type="text/javascript" >

    function addRow() {
        debugger;
        var tab = document.createElement("table");
        tab.border = 1;
        var count = window.parent.Xrm.Page.data.entity.attributes.get("new_number_table").getValue();

    
        for (var i = 0; i < count ; i++)
        {

            var row = document.createElement("tr");
           // cell.textContent = "xyz";                             

            for (var j = 0; j < count ; j++) {
                var cell = document.createElement("td");

                cell.textContent = "xyz";

                row.appendChild(cell);
            }
            tab.appendChild(row);
        }

        var div = document.getElementById("div1");
        div.appendChild(tab);
    }</script></head><body onload="addRow()"><div id ="div1" ></div></body></html>



Viewing all articles
Browse latest Browse all 8223

Trending Articles



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