18. dubna 2012 20:49I want to edit multiple account records. however, doing this also changes the owner to the person doing the update. Why is that? Is there a way to not have the owner update?
18. dubna 2012 20:58Přispěvatel
This is not the default behaviour of Dynamics CRM - are you sure that there is not some custom workflow/plugin assigning records to the modifiedby user?
Read my blog: www.develop1.net/public
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"
18. dubna 2012 22:47
There is an onload event on the form. I don't know what the code means but it says retrieve userid. Could this be the issue? This is part of the code:
// retrieve userid
var soapBody = "<soap:Body><Execute xmlns='http://schemas.microsoft.com/crm/2007/WebServices'><Request xsi:type='WhoAmIRequest' /></Execute></soap:Body>";
var soapXml = "<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'>";
soapXml += GenerateAuthenticationHeader();
soapXml += soapBody;
soapXml += "</soap:Envelope>";
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp.open("POST", "/mscrmservices/2007/crmservice.asmx", false);
xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
var userid = xmlDocUser.getElementsByTagName("UserId").childNodes.nodeValue;
soapBody = '<soap:Body><Retrieve xmlns="<entityName>systemuser</entityName><id>'+userid+'</id><columnSet">http://schemas.microsoft.com/crm/2007/WebServices"><entityName>systemuser</entityName><id>'+userid+'</id><columnSet xsi:type="ns1:AllColumns" xmlns:ns1="</Retrieve></soap:Body>'">http://schemas.microsoft.com/crm/2006/Query"/></Retrieve></soap:Body>';
soapXml = "<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'>";
19. dubna 2012 3:36
Also try to edit and update one account record. Make sure user who is not the owner update this single account record. Then check whether the owner has changed? If it has, definitely there is this code running somewhere.
Also, I know you must be looking at the correct field, but just to make sure you are looking at owner field and not modifiedby field.
Ashish Mahajan, CRM Developer, CSG (Melbourne)
My Personal Website: http://www.ashishmahajan.com
My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrm
19. dubna 2012 3:56
Can you tell me the way, that how you updated the multiple account records.....
19. dubna 2012 12:34
I am guessing you could be having a similar issue and sorry about the long story !!
All the best.
19. dubna 2012 16:46
Thank you for the responses. After doing a better job of testing, I found that it isn't changing the owner. I must have picked accounts that that particular user already owned (duh!). It added to the confusion that on the multiple edit screen, the owner is set to the user. In the screen below, Sheila is a dummy user and doesn't own anything. So sorry for my carelessness.