<Entity name="team">
<Grid>
<MenuBar>
<Buttons>
<Button Icon="/_imgs/ico_16_delete.gif" JavaScript = "var teams = getSelected('crmGrid');
for (var i = 0; i < teams.length; i++)
{
var xml = "<?xml version='1.0' encoding='utf-8'?>"+
"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'"+
" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+
" xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"+
GenerateAuthenticationHeader()+
"<soap:Body>"+
"<Delete xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>"+
"<entityName>team</entityName>"+
"<id>" + teams[i] + "</id>"+
"</Delete>"+
"</soap:Body>"+
"</soap:Envelope>";
var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xHReq.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/Delete");
xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xHReq.setRequestHeader("Content-Length", xml.length);
xHReq.send(xml);
}
crmGrid.Refresh();">
<Titles>
<Title LCID="1033" Text="Delete" />
</Titles>
<ToolTips>
<ToolTip LCID="1033" Text="Delete Selected Teams" />
</ToolTips>
</Button>
</Buttons>
</MenuBar>
</Grid>
</Entity>
<Grid>
<MenuBar>
<Buttons>
<Button Icon="/_imgs/ico_16_delete.gif" JavaScript = "var teams = getSelected('crmGrid');
for (var i = 0; i < teams.length; i++)
{
var xml = "<?xml version='1.0' encoding='utf-8'?>"+
"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'"+
" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+
" xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"+
GenerateAuthenticationHeader()+
"<soap:Body>"+
"<Delete xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>"+
"<entityName>team</entityName>"+
"<id>" + teams[i] + "</id>"+
"</Delete>"+
"</soap:Body>"+
"</soap:Envelope>";
var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xHReq.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/Delete");
xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xHReq.setRequestHeader("Content-Length", xml.length);
xHReq.send(xml);
}
crmGrid.Refresh();">
<Titles>
<Title LCID="1033" Text="Delete" />
</Titles>
<ToolTips>
<ToolTip LCID="1033" Text="Delete Selected Teams" />
</ToolTips>
</Button>
</Buttons>
</MenuBar>
</Grid>
</Entity>
No comments:
Post a Comment