6. Dezember 2010 11:41
var myAccountId = crmForm.all.espirit_marketingallgemeinid.DataValue[0].id;
var trim_myaccountId = myAccountId.substring(1, myAccountId.length -1);
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>" +
"<RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\">" +
"<query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\">" +
"<q1:EntityName>contact</q1:EntityName>" +
"<q1:ColumnSet xsi:type=\"q1:ColumnSet\">" +
"<q1:Attributes>" +
"<q1:Attribute>aufnahmedatum</q1:Attribute>" +
"</q1:Attributes>" +
"</q1:ColumnSet>" +
"<q1:Distinct>false</q1:Distinct>" +
"<q1:Criteria>" +
"<q1:FilterOperator>And</q1:FilterOperator>" +
"<q1:Conditions>" +
"<q1:Condition>" +
"<q1:AttributeName>contactid</q1:AttributeName>" +
"<q1:Operator>Equal</q1:Operator>" +
"<q1:Values> " +
"<q1:Value xsi:type=\"xsd:string\">" + trim_myaccountId + "</q1:Value>" +
"</q1:Values> " +
"</q1:Condition>" +
"</q1:Conditions>" +
"</q1:Criteria>" +
"</query>" +
"</RetrieveMultiple>" +
"</soap:Body>" +
"</soap:Envelope>" +
"";
var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xmlHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseXML;
var entityNode = resultXml.selectSingleNode("//RetrieveMultipleResult/BusinessEntities/BusinessEntity");
var aufnahmedatumNode = entityNode.selectSingleNode("q1:aufnahmedatum");
crmForm.all.espirit_aufnahmedatum.DataValue = (aufnahmedatumNode == null ) ? null : aufnahmedatumNode.text;
crmForm.all.espirit_aufnahmedatum.ForceSubmit = true;
}
6. Dezember 2010 13:14
6. Dezember 2010 14:18
if (crmForm.all.espirit_marketingallgemeinid.DataValue != null)
{
function DateTimeToStringConvert(source)
{
var source1 = source.split('T')[0];
var parts = source1.split('-');
var dat;
dat = parts[2];
dat = dat + '.' + parts[1];
dat = dat + '.' + parts[0];
return dat;
}
crmForm.all.espirit_marketingrolle.parentElement.parentElement.parentElement.style.display = '';
var myAccountId = crmForm.all.espirit_marketingallgemeinid.DataValue[0].id;
var trim_myaccountId = myAccountId.substring(1, myAccountId.length -1);
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>" +
"<RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\">" +
"<query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\">" +
"<q1:EntityName>contact</q1:EntityName>" +
"<q1:ColumnSet xsi:type=\"q1:ColumnSet\">" +
"<q1:Attributes>" +
"<q1:Attribute>espirit_aufnahmedatum</q1:Attribute>" +
"</q1:Attributes>" +
"</q1:ColumnSet>" +
"<q1:Distinct>false</q1:Distinct>" +
"<q1:Criteria>" +
"<q1:FilterOperator>And</q1:FilterOperator>" +
"<q1:Conditions>" +
"<q1:Condition>" +
"<q1:AttributeName>contactid</q1:AttributeName>" +
"<q1:Operator>Equal</q1:Operator>" +
"<q1:Values> " +
"<q1:Value xsi:type=\"xsd:string\">" + trim_myaccountId + "</q1:Value>" +
"</q1:Values> " +
"</q1:Condition>" +
"</q1:Conditions>" +
"</q1:Criteria>" +
"</query>" +
"</RetrieveMultiple>" +
"</soap:Body>" +
"</soap:Envelope>" +
"";
var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xmlHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseXML;
var entityNode = resultXml.selectSingleNode("//RetrieveMultipleResult/BusinessEntities/BusinessEntity");
var aufnahmedatumNode = entityNode.selectSingleNode("q1:espirit_aufnahmedatum");
crmForm.all.espirit_aufnahmedatum.DataValue = (aufnahmedatumNode == null ) ? null : aufnahmedatumNode.text;
var stringdate = StringToDateTimeConvert(crmForm.all.espirit_aufnahmedatum.DataValue);
crmForm.all.espirit_aufnahmedatum.ForceSubmit = true;
}
6. Dezember 2010 19:26
function DateTimeToStringConvert(source)
{
var source1 = source.split('T')[0];
var parts = source1.split('-');
var dat;
dat = parts[2];
dat = dat + '.' + parts[1];
dat = dat + '.' + parts[0];
return dat;
}
if (crmForm.all.espirit_marketingallgemeinid.DataValue != null)
{
crmForm.all.espirit_marketingrolle.parentElement.parentElement.parentElement.style.display = '';
var myAccountId = crmForm.all.espirit_marketingallgemeinid.DataValue[0].id;
var trim_myaccountId = myAccountId.substring(1, myAccountId.length -1);
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>" +
"<RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\">" +
"<query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\">" +
"<q1:EntityName>contact</q1:EntityName>" +
"<q1:ColumnSet xsi:type=\"q1:ColumnSet\">" +
"<q1:Attributes>" +
"<q1:Attribute>espirit_aufnahmedatum</q1:Attribute>" +
"</q1:Attributes>" +
"</q1:ColumnSet>" +
"<q1:Distinct>false</q1:Distinct>" +
"<q1:Criteria>" +
"<q1:FilterOperator>And</q1:FilterOperator>" +
"<q1:Conditions>" +
"<q1:Condition>" +
"<q1:AttributeName>contactid</q1:AttributeName>" +
"<q1:Operator>Equal</q1:Operator>" +
"<q1:Values> " +
"<q1:Value xsi:type=\"xsd:string\">" + trim_myaccountId + "</q1:Value>" +
"</q1:Values> " +
"</q1:Condition>" +
"</q1:Conditions>" +
"</q1:Criteria>" +
"</query>" +
"</RetrieveMultiple>" +
"</soap:Body>" +
"</soap:Envelope>" +
"";
var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xmlHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseXML;
var entityNode = resultXml.selectSingleNode("//RetrieveMultipleResult/BusinessEntities/BusinessEntity");
var aufnahmedatumNode = entityNode.selectSingleNode("q1:espirit_aufnahmedatum");
crmForm.all.espirit_aufnahmedatum.DataValue = (aufnahmedatumNode == null ) ? null : aufnahmedatumNode.text;
var stringdate = StringToDateTimeConvert(crmForm.all.espirit_aufnahmedatum.DataValue);
crmForm.all.espirit_aufnahmedatum.ForceSubmit = true;
}
7. Dezember 2010 10:59
[color=#FF0000]function DateTimeToStringConvert(source)
{
var source1 = source.split('T')[0];
var parts = source1.split('-');
var dat;
dat = parts[2];
dat = dat + '.' + parts[1];
dat = dat + '.' + parts[0];
return dat;
}[/color]
var stringdate = StringToDateTimeConvert(’2010-12-05T00:00:00+02:00′);
alert(stringdate);
if (crmForm.FormType != 4)
{
if (crmForm.all.espirit_marketingallgemeinid.DataValue != null)
{
crmForm.all.espirit_marketingrolle.parentElement.parentElement.parentElement.style.display = '';
var myAccountId = crmForm.all.espirit_marketingallgemeinid.DataValue[0].id;
var trim_myaccountId = myAccountId.substring(1, myAccountId.length -1);
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>" +
"<RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\">" +
"<query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\">" +
"<q1:EntityName>contact</q1:EntityName>" +
"<q1:ColumnSet xsi:type=\"q1:ColumnSet\">" +
"<q1:Attributes>" +
"<q1:Attribute>espirit_rolleid</q1:Attribute>" +
"<q1:Attribute>espirit_aufnahmedatum</q1:Attribute>" +
"<q1:Attribute>espirit_kontaktdurchid</q1:Attribute>" +
"<q1:Attribute>espirit_kontaktgrundid</q1:Attribute>" +
"</q1:Attributes>" +
"</q1:ColumnSet>" +
"<q1:Distinct>false</q1:Distinct>" +
"<q1:Criteria>" +
"<q1:FilterOperator>And</q1:FilterOperator>" +
"<q1:Conditions>" +
"<q1:Condition>" +
"<q1:AttributeName>contactid</q1:AttributeName>" +
"<q1:Operator>Equal</q1:Operator>" +
"<q1:Values> " +
"<q1:Value xsi:type=\"xsd:string\">" + trim_myaccountId + "</q1:Value>" +
"</q1:Values> " +
"</q1:Condition>" +
"</q1:Conditions>" +
"</q1:Criteria>" +
"</query>" +
"</RetrieveMultiple>" +
"</soap:Body>" +
"</soap:Envelope>" +
"";
var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
xmlHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseXML;
var entityNode = resultXml.selectSingleNode("//RetrieveMultipleResult/BusinessEntities/BusinessEntity");
var rolleNode = entityNode.selectSingleNode("q1:espirit_rolleid");
var aufnahmedatumNode = entityNode.selectSingleNode("q1:espirit_aufnahmedatum");
var kontaktdurchNode = entityNode.selectSingleNode("q1:espirit_kontaktdurchid");
var kontaktgrundNode = entityNode.selectSingleNode("q1:espirit_kontaktgrundid");
crmForm.all.espirit_marketingrolle.DataValue = (rolleNode == null ) ? null : rolleNode.attributes.getNamedItem("name").value;
crmForm.all.espirit_marketingrolle.ForceSubmit = true;
[color=#FF0000]//crmForm.all.espirit_aufnahmedatum.DataValue = (aufnahmedatumNode == null ) ? null : aufnahmedatumNode.text;
var stringdate = StringToDateTimeConvert(aufnahmedatumNode);
crmForm.all.espirit_aufnahmedatum.DataValue = stringdate;
crmForm.all.espirit_aufnahmedatum.ForceSubmit = true; [/color]
crmForm.all.espirit_kontaktdurch.DataValue = (kontaktdurchNode == null) ? null : kontaktdurchNode.attributes.getNamedItem("name").value;
crmForm.all.espirit_kontaktdurch.ForceSubmit = true;
crmForm.all.espirit_kontaktgrund.DataValue = (kontaktgrundNode == null) ? null : kontaktgrundNode.attributes.getNamedItem("name").value;
crmForm.all.espirit_kontaktgrund.ForceSubmit = true;
} else if (crmForm.all.espirit_marketingallgemeinid.DataValue == null) {
crmForm.all.espirit_marketingrolle.parentElement.parentElement.parentElement.style.display = 'none';
crmForm.all.espirit_marketingrolle.DataValue = null
crmForm.all.espirit_marketingrolle.ForceSubmit = true;
crmForm.all.espirit_aufnahmedatum.DataValue = null
crmForm.all.espirit_aufnahmedatum.ForceSubmit = true;
crmForm.all.espirit_kontaktdurch.DataValue = null
crmForm.all.espirit_kontaktdurch.ForceSubmit = true;
crmForm.all.espirit_kontaktgrund.DataValue = null
crmForm.all.espirit_kontaktgrund.ForceSubmit = true;
}
}
7. Dezember 2010 11:01
7. Dezember 2010 11:10
7. Dezember 2010 12:02
7. Dezember 2010 13:36
7. Dezember 2010 14:44
7. Dezember 2010 18:43
8. Dezember 2010 10:52
13. Dezember 2010 12:09
13. Dezember 2010 14:43