Current User, Web Services, CRM 4.0, Alert, Help!!

How can I alert the "Current User" in CRM 4.0, this code work in 3.0 but not 
in 4.0.

Thanks!!!








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\">" + 
" <soap:Body>" + 
" <query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" 
xsi:type=\"q1:QueryExpression\" 
xmlns=\"http://schemas.microsoft.com/crm/2006/WebServices\">" + 
" <q1:EntityName>systemuser</q1:EntityName>" + 
" <q1:ColumnSet xsi:type=\"q1:ColumnSet\">" + 
" <q1:Attributes>" + 
" <q1:Attribute>systemuserid</q1:Attribute>" + 
" <q1:Attribute>fullname</q1:Attribute>" + 
" </q1:Attributes>" + 
" </q1:ColumnSet>" + 
" <q1:Distinct>false</q1:Distinct>" + 
" <q1:Criteria>" + 
" <q1:FilterOperator>And</q1:FilterOperator>" + 
" <q1:Conditions>" + 
" <q1:Condition>" + 
" <q1:AttributeName>systemuserid</q1:AttributeName>" + 
" <q1:Operator>EqualUserId</q1:Operator>" + 
" </q1:Condition>" + 
" </q1:Conditions>" + 
" </q1:Criteria>" + 
" </query>" + 
" </soap:Body>" + 
"</soap:Envelope>" + 
"";

var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");

xmlHttpRequest.Open("POST", "/mscrmservices/2006/CrmService.asmx", false)
xmlHttpRequest.setRequestHeader("SOAPAction","http://schemas.microsoft.com/crm/2006/WebServices/RetrieveMultiple");
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);

var doc = xmlHttpRequest.responseXML;
var user = doc.selectSingleNode("//BusinessEntity");

var userId = user.selectSingleNode("systemuserid").text;
alert(userId);

var userName = user.selectSingleNode("fullname").text;
alert(userName);
0
5/19/2008 9:28:01 PM
crm 35858 articles. 1 followers. Follow

0 Replies
688 Views

Similar Articles

[PageSpeed] 8

Reply:

Similar Artilces:

Order status problem. please help
hi how can i change the status of an order to completed or something like that. there seams to be a status hierarchy assigned to the order status (fields seem to be statecode and statuscode) what i would like to have is 1. order is in status "new" 2. when somebody is working on the order the status should be set to "in progress" 3. after work is done or item is deliverd --> status = "completed" completed items should also not appear in active order list view please help! i have tried nearly everything in the user interface. i cant simple advance the status ...

How to create new Contacts form and have it apply to current conta
I can create a custom contact form by following http://office.microsoft.com/en-us/outlook/HA012106101033.aspx?mode=print But how do I apply the new form to my current contacts ? For example, if I want a Car Phone field in my new form I want to be able to go back to my current names I have in my Contacts folder and see the Car Phone field. Thanks for any help. See http://www.outlook-tips.net/beginner/publish_form.htm - end of page. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com...

CRM and Exchange Server 2007
I have three servers in my organization. One of them is DC and Exchange Server 2007 (Server A). One of them is Dynamics CRM and SharePoint 2007 (Server B). One of them is ISA Server 2006 (Server C). How can I install CRM Exchange E-mail Router in ServerA. The documentation of Router Update (http://www.microsoft.com/downloads/details.aspx?FamilyID=f7656f0f-4195-4a7d-b654-2786787e1422&DisplayLang=en) indicates the following: "Microsoft Exchange 2000 Server or Microsoft Exchange Server 2003 must be installed and operational on the computer that the Router is to be installed. NOTE...

Need help getting query to reference a field in a subform
I am trying to run a query using a specific field in a subform as the criteria. The query is displaying one combo box from the Form, as well as several fields from its own subform. My Form name is: FormGrantManagement My Subform name is: TableMOA subform My Subform's subform is: TableCostReports The field in the subform I want to reference is: MOAID I have found other help topics that lead me to think that a criteria along the lines of [Forms]![FormGrantManagement]![TableMOA subform]! [Form]![MOAID] is what I need to use, and I have tried multiple variations of this but witho...

path to dll currently executing
How would I obtain the path to the DLL which contains the code which is currently executing ? This is a Web Services project, and so the \bin\ folder is obviously at a different path design-time v run-time. Thanks. On 1/6/2010 9:12 PM, John Grandy wrote: > How would I obtain the path to the DLL which contains the code which is > currently executing ? > > This is a Web Services project, and so the \bin\ folder is obviously at a > different path design-time v run-time. > > Thanks. > > System.Reflection.Assembly.GetExecutingAssembly().Locati...

Current Cost
On the Item Maintenance screen, there is a spot for current cost. Is this cost the last price used to purchase an item? Also, how is this field calculated? "Ryan" wrote: > On the Item Maintenance screen, there is a spot for current cost. Is this > cost the last price used to purchase an item? Hi Ryan. The current cost is calculated based on the valuation method. If you hit Help (F1) off the item card, go to the fields help, and check under valuation method, there is info to get you started. Hope this helps, Maria. "Ryan" wrote: > On the Item Maintenance ...

Restricting Mailing lists to authenticated users
Hi, I have set a mailing list to only recieve from authenticated users, but it's still getting mail from outside addresses. I setup this option from the Exchange General tab of the group account. I checked the box, but it doesn't appear to be working. HELP. Thanks in advance, Tom ...

Excel VBA
Hi Excel VBA advisers! I have a userform where there are two text boxes (drugdesc1 & drugdesc2) that I want to force 4 commas to be keyed into both fields. 4 commas are MANDATORY in each text box & are used to separate the type of input within each. ie; brand name, ingredients, strength, form, pack size. (FYI: Later on, I split these fields into 4 separate columns based on the comma delimiter.) When "cmdAdd" command button is clicked, I need to display a msgbox to advise user and disallow the add. I imagine that the code (repeated for each text box) that I would put in th...

how to copy Excel file on to a web site?
Excel will not allow Select All in Edit to copy the file so it can be put on a web site so how can it be done? It's difficult to understand what your trying to do, but in versions after 2000 you can go to File>Save as web page -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS "drace19" <drace19@discussions.microsoft.com> wrote in message news:DAAD8558-EBFC-4F21-94FE-AB7BC92EC9B1@microsoft.com... > Excel will not allow Select All in Edit to copy the file so it can be put > on > a web ...

Notify User of new case
Hello, I need to create an attribute/field in cases called "notify" with a pick list of users who are other CRM users. When a user is in a case and selects the notify field and selects a user i need an email to be sent to the user. I have managed to create the attribute and field in the case and also use workflows to send an email to the user in the notify section, but this only happens when a new case is created. If i then change the notify person and save... ntohing happens how can i tell the workflow to check for a change of the notify user and send an email to the appropr...

Can someone give me the outlook express server details for other good Apple users newsgroups?
I'm looking for the servers etc, thanks in advance ...

Can more as 1 user use Excel File in Intranet in the same Time
Can more as 1 user use or modify Excel File in Intranet in the same ?? no excel is for fucking retards. use a database; Excel has ZERO VALUE -Aaron ADP Nationalist marcin wrote: > Can more as 1 user use or modify Excel File in Intranet in the same ?? ...

Last access to a users Mailbox
Hi, I want to see the latest access to a users access to his exchange mailbox. In the system manager, i can see the latest access, is there a possibility to see the for example last three accesses. Thanks in advance! Oliver Not without some sort of 3rd party monitoring solution. -- Ben Winzenz Exchange MVP "drgoebel" <drgoebel@discussions.microsoft.com> wrote in message news:15E6FB13-231B-4188-A2BB-AC8692ACDDF6@microsoft.com... > Hi, > > I want to see the latest access to a users access to his exchange mailbox. > In the system manager, i can see the latest...

Problems with current currency!
Hi. I found serious problem with currencies handling in MS Money Plus! I set up BASE currency as USD but MS Money still try to use currency specified in locale settings (RUR)! It looks very bad - like MS money able to work only in US locale and only with US currency. :-( I have made lot of experiments - uninstalled MS money, installed again, killed databases, created it from scratch, tried different variants of settings... unfortunately - without positive effect. Even if I setp 1 setp forward it finally crashed on the one of next steps or put wrong currency to the invoice. :-((( I...

CRM Queue 05-06-04
We are already having service@domain.com e-mail address as a public folder on our exchange. I want to direct those e- mails in to CRM. I tried createing CRM Queue and configuring public folder attributes. But does not seems to be working. Any one has tried this thing? Normal way of creating CRM Queue works, no problem but it's necessary for me to divert public folder e-mails to CRM. thanks, Rakesh Did you: 1) create a generic user inm AD (the queue-owner) 2) create a mailbox for that id 3) disable the user 4) set an Exchange Custom Attribute to CRMEmailEnabled Regards, Per >...

[ANN]VTD-XML 2.0
The VTD-XML project team is proud to announce the release of version 2.0 of VTD-XML, the next generation XML parser/indexer. The new features introduced in this version are: * VTD+XML version 1.0: the world's first true native XML index that is simple, general-purpose and back-compatible with XML. * NodeRecorder Class that saves VTDNav's cursor location for later sequential access. * Overwrite capability * Lexically comparisons between VTD and strings To download the software, please go to http://sourceforge.net/project/showfiles.php?group_id=110612 To read the latest benchmark repo...

Changed some users to New Exchange 2003 Server
We recently acquired a brand new exchange 2003 server and have moved some mailboxes from the old exchange 2003 server to the new one. I was wondering if there is a hands off way of changing all of the end users profiles to point to the new server (usernames are still the same) in outlook 2000? Thanks in advance! If the old server is still in place and is in the same administrative group, then you shouldn't need to do anything. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outl...

how to handle services
I have a problem I need a solution on how to handle the services a computer stores charges it customers for repairs ect. The computer store the store sell computers, parts and accesories plus they perform services How should I handle the services since they need to be tracked the service department does the reairs and the customers service ring up the charges based on the types of services performed example O/S reinstall $75.00, virus remove $50.00, etc Thanks Ian First what POS are you using RMS or POS? If you have more than one sales lane in RMS you could create a work order wh...

How do I get the currently selected mail
I have written a COM addin to add a command bar along with a menu item to MS Outlook. On clicking this menu item I am able to identify the currently selected folder. My approach is as follows: void __stdcall CAddin::OnClickButton(/*IDispa=ADtch*/ Office::_CommandBarButton *Ctrl,VARIANT_BOOL * CancelDefault) { Outlook::MAPIFolder * m_pFolder; CComQIPtr<Office::_CommandBarB=ADutton,&__uuidof(Office::_Comma=ADndBarButt= on)> pCommandBarButton(Ctrl); BSTR fullFolderPath; CComQIPtr <Outlook::_Application> spApp(pApplication); CComPtr<Outlook::_Explorer> spEx...

Installing Windows XP with Service Packs
I have a volume license copy of XP which I need to install on 15 machines. Unfortunately it is an old disk so I need to install SP2, then SP3 afterwards which takes a long time (on 1 machines). Is it possible to obtain or create an XP install disk which incorporates SP2 and SP3? Thanks Software Monkey wrote: > I have a volume license copy of XP which I need to install on 15 machines. > Unfortunately it is an old disk so I need to install SP2, then SP3 afterwards > which takes a long time (on 1 machines). > > Is it possible to obtain or create an XP install ...

Not current record
Hi I am new to Access so please help. I have a form (frmAttendance) and within this form I have a button. This button opens another form (frmTravel). forms!frmAttendance!ssn = forms!frmTravel!ssn and forms!frmAttencance!meet_num = forms!frmTravel!meet_num. This all works great! What the problem is: when I close the frmTravel it does not go back to the current record on frmAttendance. Example: frmAttendance ssn = 777-77-7777 frmAttendance meet_num = 45r45r frmTravel ssn = 777-77-7777 frmTravel meet_num = 45r45r This works great! BUT when closing frmTravel frmTravel ssn = 777-77-777...

Please help me set up two outlook accounts. I am having problems.
You dont give much info; Use the mail applet in the control panel to add the account info and test "marriedouglas" <marriedouglas@discussions.microsoft.com> wrote in message news:75544C81-1CFB-492B-857A-58233150FAD5@microsoft.com... > ...

SQL report to filter for Current user
I am working on a SQL report, and i need to filter the data for the current user logged in to CRM. Something like where current user id = user id of activity. What I am looking for is how to find the current user id. Much thanks in advance! An easier solution is not to build that into the report; simply use the default filter to do that. No coding needed "ilibhart" <ilibhart@discussions.microsoft.com> wrote in message news:92DE3638-A92A-42C8-BDEA-A8686829D249@microsoft.com... >I am working on a SQL report, and i need to filter the data for the current > user l...

HTML TEMPLATES
I really need some help - I know how to create an HTML template to use with outlook - but I don't to use it all the time, only when sending out emails, is there a way to select to use the html template when i want to send certain emails? I can't find this info anywhere. Of course, Outlook Exp makes this really easy, you just select a template from a drop down list when creating a new message - surely there's some way to do the same thing in outlook?? "Tal" <goer2u4@hotmail.com> wrote in message news:44c6625c@news.comindico.com.au... >I really need some ...

Prevent users to save workbook
Hi, How to avoid users to save the workbook? I tried to protect workbook and protect worksheet, but doesn't work. Can anyone help? Thanks a lot! Terence Terence Place this code in the "ThisWorkbook" module Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = True End Sub -- XL2002 Regards William willwest22@yahoo.com "Terence" <terence5070@hotmail.com> wrote in message news:06b701c36b8d$7961d000$a601280a@phx.gbl... | Hi, | | How to avoid users to save the workbook? I tried to | protect workbook and protect worksheet, bu...