Attachment in CRM
-
2012年3月26日 8:49
Hi All ;
I am very much new to CRM
Currently I have been using CRM 4.0
I need to to know how the following word document(3,6 Month, Annual, Job Created BD, Individual BD) is attach to CRM and is their a way I can edit the document
Any help much appreciated
Thanks
Pradnya
Pradnya07
すべての返信
-
2012年3月26日 8:58
Based on the screenshot it appears that some one has customized your CRM system to add these documents. This is not out of the box behaviour provided by CRM. To find out where these documents reside you will have to do some research.
I would say there are two posibilities, either the documents are stored on the server or are generated on the fly. If the documents are on the server the easiest way to find them is to connect to the server and using windows explorer search the website directory for all .doc and .docx. CRM does not contain much or any so they should be easy to find.
If you cannot find them try looking and the ISV.config file you can use this tool http://www.patrickverbeeten.com/CRM-Applications/ISVConfig--Sitemap, or export the isv.config from the CRM export customizations (unzip and open the customizations.xml file). This file will contain the definition of the buttons (search for "Jobs Created BD") the url or javascript should give you a hint as to the location of the files.Patrick Verbeeten
www.patrickverbeeten.com
www.wavextend.com -
2012年3月26日 9:21
HI Patrick;
Thanks for your reply
In my case I didnt find anything in ISV.config file so i thinkit should be the other possibility
How is the word document attached, will there be a javascript code or a plugin written
If yes how do i search for the code
Pradnya
Pradnya07
-
2012年3月26日 9:23If it is not in the ISV.Config it must be in javascript (Plugins cann't add form UI elements). The javascript can be found in the form customization and should be located in the onload event of the form.
Patrick Verbeeten
www.patrickverbeeten.com
www.wavextend.com -
2012年3月26日 10:06
Hi Patrick;
This is the javascript code attach to the onload event of this form
But i dont find any code related to the top menu with 3,6 Month, Annual, Job Created BD, Individual BD
Am i looking at the wrong thing ?
Thanks
Pradnya
// jj 19 oct 2010
var ReviewType_OnChange = function() {
var ReviewType = crmForm.all.new_businessreviewstage;
// 3 or 6 month Review Hide Sections
if( ReviewType.DataValue == 7 || ReviewType.DataValue == 1 || ReviewType.DataValue == null)
{
//Hide first section in second tab.
HideSection( 1,0 , "none" );
//Hide second section in second tab.
HideSection( 1,1 , "none" );
//Hide third section in second tab.
HideSection( 1,2 , "none" );
}
else
{
HideSection( 1,0 , "inline" );
HideSection( 1,1 , "inline" );
HideSection( 1,2 , "inline" );
}
}
var ReviewType = crmForm.all.new_businessreviewstage;
ReviewType.attachEvent( "onchange" , ReviewType_OnChange);
// tabs and section are zero based
function HideSection( tabIndex , sectionIndex , displayType )
{
var tab2Hide = document.getElementById( "tab" + tabIndex );
tab2Hide.childNodes[0].rows[ sectionIndex ].style.display = displayType;
}crmForm.all.new_businessreviewstage.FireOnChange();
// end jj// Resize the default Window Size
window.resizeTo(1200,1200);
//window.moveTo(110,110);document.getElementById("navActivityHistory").style.display = "none";
document.getElementById("navActivities").style.display = "none";HideAssociatedViewButtons('new_new_businessreview_new_employeedetails', ['Add existing Employee Details to this record']);
HideAssociatedViewButtons('new_review_futureneed', ['Add a new Expected Future Needs to this record']);
function HideAssociatedViewButtons(loadAreaId, buttonTitles){
var navElement = document.getElementById('nav_' + loadAreaId);
if (navElement != null) {
navElement.onclick = function LoadAreaOverride() {
// Call the original CRM method to launch the navigation link and create area iFrame
loadArea(loadAreaId);
HideViewButtons(document.getElementById(loadAreaId + 'Frame'), buttonTitles);
}
}
}
function HideViewButtons(Iframe, buttonTitles) {
if (Iframe != null ) {
Iframe.onreadystatechange = function HideTitledButtons() {
if (Iframe.readyState == 'complete') {
var iFrame = frames[window.event.srcElement.id];
var liElements = iFrame.document.getElementsByTagName('li');
for (var j = 0; j < buttonTitles.length; j++) {
for (var i = 0; i < liElements.length; i++) {
if (liElements[i].getAttribute('title') == buttonTitles[j]) {
liElements[i].style.display = 'none';
break;
}
}
}
}
}
}
}
//hide field on action of other fieldif (crmForm.all.new_isthebusinessstilltrading!= null) {
crmForm.all.new_isthebusinessstilltrading.FireOnChange();
}
//hide field on action of other field
if (crmForm.all.new_legalstatuschanged!= null) {
crmForm.all.new_legalstatuschanged.FireOnChange();
}
//hide field on action of other field
if (crmForm.all.new_doyouexport!= null) {
crmForm.all.new_doyouexport.FireOnChange();
}//hide field on action of other field
if (crmForm.all.new_ineducationtraining!= null) {
crmForm.all.new_ineducationtraining.FireOnChange();
}
//Calculate Gross Value Added//Calc value of fields
//A field is accessed with crmForm.all.<the_field_name>
//A field value is accessed through its DataValue propertyvar value1 = crmForm.all.new_turnoveronwages.DataValue;
var value2 = crmForm.all.new_turnoveronmaterials.DataValue;
var value3 = crmForm.all.new_grossprofit.DataValue;
var value4 = crmForm.all.new_annualturnover.DataValue;//The DataValue of an empty field is null, so in order to
//sum up the values, you have to check for null values
value1 = (value1 == null) ? 0 : value1;
value2 = (value2 == null) ? 0 : value2;
value3 = (value3 == null) ? 0 : value3;
value4 = (value4 == null) ? 0 : value4;//Setting a value follows the same rules used for retrieving
//crmForm.all.new_grossvalueadded.DataValue = value1 + value2 + value3;crmForm.all.new_grossvalueadded.DataValue = (value4 *( value1/100)) + (value4 * (value2/100)) + value3;
///* ******************************************************* */
/* Microsoft CRM 4.0 JavaScript Anpassung */
/* NotesCount (v0.5) - CRM-Services 2007 */
/* netzhaus AG */
/* ******************************************************* */
/* Autor: Thomas Roschinsky (tr@netzhaus.ag) */
/* Datum: 11.04.2009 */
/* */
/* Projekt: http://notescount.codeplex.com */
/* */
/* Konfiguration: */
var oNotesTab = document.getElementById('tab2Tab');//Jim use
//tab1Tab for 2nd tab etc
var oNotesDetail = true;
var oNotesDetailColorNote = "#AA4E26";
var oNotesDetailColorFile = "#3C643A";
var oNotesOverview = true;
/* */
/* ******************************************************* */
function displayNotesOverview(e) {
try {
var NotesCountOV = document.getElementById('NotesCountOV');
var posX = 0;
var posY = 0;
if (!e) var e = window.event;
if (e.pageX || e.pageY){
posX = e.pageX;
posY = e.pageY;
}
else if (e.clientX || e.clientY){
posX = e.clientX + document.body.scrollLeft;
posY = e.clientY + document.body.scrollTop;
}
NotesCountOV.firstChild.style.width = NotesCountOV.style.width;
NotesCountOV.firstChild.style.left = (posX).toString()+"px";
NotesCountOV.firstChild.style.top = (posY+20).toString()+"px";
NotesCountOV.style.visibility = (e.type == "mouseleave") ? "hidden" : "visible";
}
catch(ex) {}
}
function WSRetrieveMultiple(crmEntity, resultAttribute, queryAttribute, queryValue) {
try {
var oXMLSoapMsg = "<?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().toString()+
"<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>"+crmEntity+"</q1:EntityName>"+
"<q1:ColumnSet xsi:type='q1:ColumnSet'>"+
"<q1:Attributes>"+
"<q1:Attribute>"+resultAttribute+"</q1:Attribute>"+
"<q1:Attribute>isdocument</q1:Attribute>"+
"<q1:Attribute>filename</q1:Attribute>"+
"</q1:Attributes>"+
"</q1:ColumnSet>"+
"<q1:Distinct>false</q1:Distinct>"+
"<q1:Criteria>"+
"<q1:FilterOperator>And</q1:FilterOperator>"+
"<q1:Conditions>"+
"<q1:Condition>"+
"<q1:AttributeName>"+queryAttribute+"</q1:AttributeName>"+
"<q1:Operator>Like</q1:Operator>"+
"<q1:Values>"+
"<q1:Value xsi:type='xsd:string'>"+queryValue+"</q1:Value>"+
"</q1:Values>"+
"</q1:Condition>"+
"</q1:Conditions>"+
"</q1:Criteria>"+
"</query>"+
"</RetrieveMultiple>"+
"</soap:Body>"+
"</soap:Envelope>";
var oXMLHTTPReq = new ActiveXObject("Msxml2.XMLHTTP");
oXMLHTTPReq.onreadystatechange = function() {
if(oXMLHTTPReq.readyState == 4){
WSResultHandler(oXMLHTTPReq.responseXML, resultAttribute, queryAttribute);
}
};
oXMLHTTPReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
oXMLHTTPReq.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple");
oXMLHTTPReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
oXMLHTTPReq.setRequestHeader("Content-Length", oXMLSoapMsg.length);
oXMLHTTPReq.send(oXMLSoapMsg);
}
catch(ex){}
}
function WSResultHandler(resultSetXML, resultAttribute, queryAttribute) {
try {
var errorCount = resultSetXML.selectNodes('//error').length;
if (errorCount != 0){
var msg = resultSetXML.selectSingleNode('//description').nodeTypedValue;
alert(msg);
}
else{
var results = resultSetXML.getElementsByTagName('BusinessEntity');
var resultsOverview = "";
if (results.length != 0){
resultsOverview += "<div style=\"z-index:+300; padding:5px; font-size:xx-small; border: solid 1px #C5C5C5; background-color:#FFFFAE; position:absolute; filter:alpha(opacity:90);\">";
resultsOverview += "<strong>Attachments and notes</strong>";
resultsOverview += "<table border=\"0\" style=\"font-size: xx-small\">";
var cntNote = 0;
var cntFile = 0;
var lenTitle = 0;
for (i=0;i < results.length;i++){
if(results[i].selectSingleNode('./q1:isdocument').nodeTypedValue == 0){
resultsOverview += "<tr><td><img src=\"/_imgs/ico_16_5_d.gif\" alt=\"Notiz\" /></td><td width=\"100%\" style=\"color:"+oNotesDetailColorNote+";\">"+results[i].selectSingleNode('./q1:'+resultAttribute).nodeTypedValue+"</td></tr>";
lenTitle = (lenTitle < results[i].selectSingleNode('./q1:'+resultAttribute).nodeTypedValue.toString().length) ? results[i].selectSingleNode('./q1:'+resultAttribute).nodeTypedValue.toString().length : lenTitle;
cntNote++;
}
else{
resultsOverview += "<tr><td><img src=\"/_imgs/ico_16_1001_d.gif\" alt=\"Dateianlage\" /></td><td width=\"100%\" style=\"color:"+oNotesDetailColorFile+";\">"+results[i].selectSingleNode('./q1:filename').nodeTypedValue+"</td></tr>";
lenTitle = (lenTitle < results[i].selectSingleNode('./q1:'+resultAttribute).nodeTypedValue.toString().length) ? results[i].selectSingleNode('./q1:filename').nodeTypedValue.toString().length : lenTitle;
cntFile++;
}
}
resultsOverview += "</table>";
resultsOverview += "</div>";
resultsDetails = (oNotesDetail) ? ": <font color=\""+oNotesDetailColorNote+"\">"+cntNote.toString()+"</font>/<font color=\""+oNotesDetailColorFile+"\">"+cntFile.toString()+"</font>" : "";
oNotesTab.firstChild.style.color = '#EE6000';
oNotesTab.firstChild.innerHTML += ' (<strong>' + results.length.toString() + '</strong>'+resultsDetails+')';
oNotesTab.parentNode.style.width = (parseInt(oNotesTab.parentNode.style.width.substring(0, oNotesTab.parentNode.style.width.indexOf("px")))+65).toString() + 'px';
if(oNotesOverview){
var divNotesCountOV = document.createElement("div");
divNotesCountOV.setAttribute('id', 'NotesCountOV');
divNotesCountOV.style.visibility = "hidden";
divNotesCountOV.style.width = (lenTitle <= 70) ? parseInt((lenTitle * 6)).toString() + "px" : "420px";
document.body.appendChild(divNotesCountOV);
divNotesCountOV.innerHTML = divNotesCountOV.innerHTML+resultsOverview;
oNotesTab.firstChild.attachEvent('onmouseenter', displayNotesOverview);
oNotesTab.firstChild.attachEvent('onmouseleave', displayNotesOverview);
}
}
}
}
catch(e){}
}
if(crmForm.ObjectId!=null){
WSRetrieveMultiple('annotation', 'subject', 'objectid', crmForm.ObjectId.toString());
}
/* END *************************************************** */
/* NotesCount */Pradnya07
-
2012年3月26日 10:12
I agree there is nothing in here that adds buttons to the toolbar. You can try using the IE developers tool (press F12) to see if you can find anything else. This will allow you to search the source of the page which may give you some clue as to what is happening. You can also set a break point on the script of the button to see what happens there.
The only other places I can think of to add elements to the page are the actual aspx page itself or an HTTP Module but these are not supported nor the most efficient way of doing something like this.
Patrick Verbeeten
www.patrickverbeeten.com
www.wavextend.com -
2012年3月26日 11:21
Hi Patrick;
Thank you so much for your help
I did looked at the code by F12 and found following lines for 3,6 Month, Annual, Job Created BD, Individual BD for all the four attachment
Where exactly should i look for teh code. I didnt find any folder with name x2fcustom on the server
I am so sorry to be such pain but i really wanted to get this sorted
Thanks once again
Pradnya
<LI style="DISPLAY: inline" id=ISV_New_1482_36Month class=ms-crm-Menu title="Run Intensive Start Up Support Business Review (3,6 month contact)" tabIndex=-1 onclick=window.execScript(action) action="openIsvWin('\x2fcustom\x2fDefault.aspx\x3fdocumenttomerge\x3dintensivestartupltr3a6',true,'0','height\x3d10,width\x3d10', window);"><SPAN class=ms-crm-Menu-Label><A class=ms-crm-Menu-Label tabIndex=-1 onclick="return false;" href="javascript:onclick();" target=_self><IMG class=ms-crm-Menu-ButtonFirst tabIndex=-1 alt="" src="/custom/16_doc.gif"><SPAN style="DISPLAY: inline" class=ms-crm-MenuItem-TextRTL tabIndex=0> 3,6 Month </SPAN></A></SPAN></LI>
<LI style="DISPLAY: inline" id=ISV_New_1483_Annual class=ms-crm-Menu title="Run Intensive Start Up Support Business Review (annual)" tabIndex=-1 onclick=window.execScript(action) action="openIsvWin('\x2fcustom\x2fDefault.aspx\x3fdocumenttomerge\x3dintensivestartupltr12',true,'0','height\x3d10,width\x3d10', window);"><SPAN class=ms-crm-Menu-Label><A class=ms-crm-Menu-Label tabIndex=-1 onclick="return false;" href="javascript:onclick();" target=_self><IMG class=ms-crm-Menu-ButtonFirst tabIndex=-1 alt="" src="/custom/16_doc.gif"><SPAN style="DISPLAY: inline" class=ms-crm-MenuItem-TextRTL tabIndex=0> Annual </SPAN></A></SPAN></LI>
<LI style="DISPLAY: inline" id=ISV_New_1484_JobsCreatedBD class=ms-crm-Menu title="Run Jobs Created Beneficiary Details" tabIndex=-1 onclick=window.execScript(action) action="openIsvWin('\x2fcustom\x2fDefault.aspx\x3fdocumenttomerge\x3dbeneficiarydetailsjobscreated',true,'0','height\x3d10,width\x3d10', window);"><SPAN class=ms-crm-Menu-Label><A class=ms-crm-Menu-Label tabIndex=-1 onclick="return false;" href="javascript:onclick();" target=_self><IMG class=ms-crm-Menu-ButtonFirst tabIndex=-1 alt="" src="/custom/16_doc.gif"><SPAN style="DISPLAY: inline" class=ms-crm-MenuItem-TextRTL tabIndex=0> Jobs Created BD </SPAN></A></SPAN></LI>
<LI style="DISPLAY: inline" id=ISV_New_1485_IndividualBD class=ms-crm-Menu title="Run Individual Beneficiary Details" tabIndex=-1 onclick=window.execScript(action) action="openIsvWin('\x2fcustom\x2fDefault.aspx\x3fdocumenttomerge\x3dbeneficiarydetailsindividual',true,'0','height\x3d10,width\x3d10', window);"><SPAN class=ms-crm-Menu-Label><A class=ms-crm-Menu-Label tabIndex=-1 onclick="return false;" href="javascript:onclick();" target=_self><IMG class=ms-crm-Menu-ButtonFirst tabIndex=-1 alt="" src="/custom/16_doc.gif"><SPAN style="DISPLAY: inline" class=ms-crm-MenuItem-TextRTL tabIndex=0> Individual BD </SPAN></A></SPAN></LI>
Pradnya07
-
2012年3月26日 11:26
The urls are encoded '\2xf' is '/' so the folder is url would be /custom/default.aspx?documenttomerge=intensivestartupltr3a6
The folder custom is located under the CRM web root. Typical locations for these are C:\inetpub\wwwroot or <CRM Install dir>\CrmWeb. If you cannot locate them go to the IIS Manager right click on the CRM web application there should be an option explore or open in explorer or something.
Patrick Verbeeten
www.patrickverbeeten.com
www.wavextend.com- 回答としてマーク Simran08 2012年3月26日 12:18
-
2012年3月26日 12:18
Hi Patrick,
Thank you so much you are a star
I did get those word documents
Thanks once again
Pradnya
Pradnya07
- 編集済み Simran08 2012年3月26日 12:38