function getdeals(rowEntry,rowId) {
    $.ajax({
        url: "xhr/getElement",
        dataType: "JSON",
        data: {
            table:'all_deals',
            rowId:rowId,
            rowEntry: rowEntry
        },
        success: function(data) {
            $("#dealsdialog").html("<div class='pull-right add_deal_profile' data-toggle='modal' data-target='#deal_modal' data-origin='profile'><a  data-e-name=add class='org btn btn-default btn-sm '> <i class='fa fa-plus'></i></a></div><span class='title bold'>Deals</span><hr>");
            var ul = $("<ul>");
            $.each(data, function(index, element) {
                ul.append("<li><a style='color:black !important;' href="+site_link+"crm/dealDetails/" + element['deal_id'] + ">" + element['deal_title'] + "</a></li>")
            });
            $("#dealsdialog").append(ul);
        }
    })
}
function getperson() {
    $.ajax({
        url: "xhr/getElement",
        dataType: "JSON",
        data: {
            table:'tbl_contacts',
            rowEntry:'organization_id',
            rowId:$("#org_id").val()
        },
        success: function(data) {
            $("#persondialog").html("<div class='pull-right add_contact_profile' data-toggle='modal' data-target='#contact_modal' data-origin='profile'><a  data-e-name=add class='org btn btn-default btn-sm '> <i class='fa fa-plus'></i></a></div><span class='title bold'>Person</span><hr>");
            var ul = $("<ul>");
            $.each(data, function(index, element) {
                ul.append("<li><a style='color:black !important;' href="+site_link+"crm/contactProfile/" + element['contact_id'] + ">" + element['contact_name'] + "</a></li>")
            });
            $("#persondialog").append(ul);
        }
    });
}

