Published by

Comments

# re: The Supreme Gamer

Look's like someone's completely addicted to Ebay... tisk tisk!

Friday, April 21, 2006 3:41 PM by jgood

# re: The Supreme Gamer

I haven't been active on eBay since college.  Look at my feedback, it's all old.  And I was the seller most of the time.

Monday, April 24, 2006 2:42 PM by vbullinger

# re: Odd Junk Mail Filter Issue

I would agree with Mike. Most filters work by adding a rank to a grouping of words and  tallying up some sort of weight.

Of course, coming up with a weighted phrase containing "Comments" is hard. Is there any logs or filter options on the clients mail system that you can look at and see what triggered the filter? Most software will tell you...

Tuesday, June 20, 2006 12:53 PM by jgood

# re: Writing A CRM Callout Assembly: A How To

One thing that seemed to give me problems when moving this to production (this was written after it was in a development environment) was the credentials.  I mentioned it was important to know the user name, password and domain.  Meh, not so much.  An easy way to do this without knowing the accurate credentials is as follows:

CrmService service = new CrmService();
service.Url = "http://<yourserver>/mscrmservices/2006/CrmService.asmx";
service.PreAuthenticate = true;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
WhoAmIRequest userRequest = new WhoAmIRequest();
WhoAmIResponse userResponse = (WhoAmIResponse)service.Execute(userRequest);

In this scenario, you are using the "default credentials" which are the credentials of the user that fired off the callout.  This is sometimes a good idea and sometimes a bad one, depending on your scenario.  In mine, it was a great solution because it would mean that the only way I could modify the objects I wanted to modify in my callout is if the user that instigated the action that fired off my callout has the power to modify the objects my callout wants to modify.  This is more than likely a good solution, but use it with caution.

Thursday, November 02, 2006 2:05 PM by vbullinger

# re: Accessing Parent DataItem of a Child DataItem

Hello -

I could not get this to work.May be my situation is different.

<asp:Repeater ID="IssueSummary_Repeater" runat="server"  >
                   <HeaderTemplate>
                       <table  border="0" cellspacing="1" cellpadding="0">
                        <tr>
                           <td> Internal Message</td>
                           <td> External Message</td>
                           <td> State</td>
                        </tr>
                       
                   </HeaderTemplate>
                   <ItemTemplate>
                       <fieldset>
                            <tr>
                               <td><asp:Literal ID="litInternalMessage" runat="server"  Text='<%# DataBinder.Eval(Container.DataItem, "[\"sInternalMessage\"]")%>'></asp:Literal></td>
                               <td><asp:Literal ID="litExternalMessage" runat="server"  Text='<%# DataBinder.Eval(Container.DataItem, "[\"sExternalMessage\"]")%>'></asp:Literal></td>
               <td><select
                                       onchange="ChangeIssueState(this,'<%# DataBinder.Eval(Container.DataItem, "[\"fkUserOrder\"]")%>','<%# DataBinder.Eval(Container.DataItem, "[\"pkIssueTracker\"]")%>');">
                                       <asp:Repeater ID="IssueState_Repeater" OnLoad="OnLoad_BindIssueStateList" runat="server">
                                           <ItemTemplate>
                                           
                                           <option  
                                               fieldTypeName='<%# DataBinder.Eval(Container.DataItem, "[\"sIssueState\"]")%>'
                                               value='<%# DataBinder.Eval(Container.DataItem, "[\"pkIssueState\"]")%>' >
                                               <%# DataBinder.Eval(Container.DataItem, "[\"sIssueState\"]")%>
                                           </option>
                                           </ItemTemplate>
                                       </asp:Repeater>
                                   </select>  
               </td>
                         </tr>
                       </fieldset>
                  </ItemTemplate>
                  <FooterTemplate >
                       </table>
                  </FooterTemplate>
               </asp:Repeater>

On the <select> i want to show which item is selected.The outer Repeater "IssueSummary_Repeater" gets "pkIssueState" from the datasource.
I should be able to match pkIssueState from Outer repeater with pkIssueState from inner repeater "IssueState_Repeater" and print "selected" within the <option> tag.
I tried this <%# DataBinder.Eval(((System.Web.UI.WebControls.RepeaterItem)Container.Parent.Parent).DataItem, "[\"pkIssueState\"]") %>

but did not work.Can you pls suggest what is missing.

Thursday, December 28, 2006 8:27 PM by techhelp

# re: Writing A CRM Callout Assembly: A How To

Hi.

I faced some problems using webservices in a callout.

While running an import script which calls the execute command several times, the callout is executed, but when no more connections available, the following exception is thrown in IIS:

The underlying connection was closed: An unexpected error occurred on a send

Remarkable is that, this exceptions does not appear to be thrown back to the import script.

I'm still looking for a possible workaround on this one..

Thursday, August 09, 2007 1:10 PM by Dido

# re: Writing A CRM Callout Assembly: A How To

Hi. It seems i've found a solition for my own comment

Add this to your reference.cs:

protected override System.Net.WebRequest GetWebRequest(Uri uri)

       {

           //throw new Exception("Custom WebRequest override code hit!!");

           System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)base.GetWebRequest(uri);

           webRequest.ConnectionGroupName = "CrmCalloutA";

           return webRequest;

       }

       [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace = "urn:objective.com", ResponseNamespace = "urn:objective.com", Use = System.Web.Services.Description.SoapBindingUse.Encoded, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]

       [return: System.Xml.Serialization.SoapElementAttribute("result")]

       public object send(Object request)

       {

           System.Net.ServicePoint sp;

           object[] results;

           sp = System.Net.ServicePointManager.FindServicePoint(new Uri(this.Url));

           //DON'T USE THESE!

           //sp.ConnectionLeaseTimeout = 0

           //sp.MaxIdleTime = 0

           try

           {

               results = this.Invoke("send", new object[] { request });

           }

           catch (Exception ex)

           {

               if (ex.Message.Equals("The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."))

               {

                   //log the fact that the server has unexpectedly dropped the connection

                   //<insert log code here (couldn't be bothered writing this bit)>

                   //close the client connection (using the ConnectionGroupName set above)

                   sp.CloseConnectionGroup("CrmCalloutA");

                   //reinvoke

                   results = this.Invoke("send", new object[] { request });

               }

               else

               {

                   throw (ex);

               }

           }

           return (object)results[0];

       }

Thursday, August 09, 2007 2:08 PM by Dido

# re: Adding Transparency to SWFObjects

Sweet!

After having searched seemingly forever, your solution was the only one that worked for me.

Verified in Firefox 2.0.0.6 and Safari 2.0.4

Thanks a lot for sharing.

Cheers,

Andreas

Thursday, August 30, 2007 5:28 AM by Andreas Thyholdt

# re: Writing A CRM Callout Assembly: A How To

Hi,

I found error "declaration Expected" for staements

   service.Uri = "any url"

service.Uri = "ASD"

   service.Credentials = new NetworkCredential(<CRM_USER>, <CRM_PASSWORD>, <CRM_DOMAIN>)

   dim userResponse as WhoAmIResponse = (WhoAmIResponse)service.Execute(userRequest)

and when i write 'service' then press dot(.) nothing is shown but when i press ctrl+space then properties are shown.

one thing more; there is no "url" property for service object else it is uri?

Please help me now.

Its urgent.

Tuesday, September 04, 2007 5:07 AM by Ulfat

# re: CRM JScript Bug

maybe it didnt work because you didnt close the comment with a ; ?? i dont know-- is that more of a java thing?

Tuesday, September 04, 2007 8:29 AM by em

# re: Writing A CRM Callout Assembly: A How To

Well, Ulfat, step one?  Don't use VB.

Step two?  That error message is giving no help at all: http://ryangregg.com/PermaLink,guid,6aa52998-8f10-4726-897d-08eb0823126d.aspx

Notice how this is only a problem in VB?

Url is, indeed, a property of the CrmService object.  I've used it many, many times.  I also can't help you with the Intellisense "problem."  I have noticed that happen to me, occasionally, and either rebuilding the solution/project or closing it/opening it fixes the issue.  I question if you are using the correct object (CrmService).

Tuesday, September 04, 2007 8:50 AM by vbullinger

# re: CRM JScript Bug

The semi-colon would have been commented out, just like the swirly bracket was.

Tuesday, September 04, 2007 8:52 AM by vbullinger

# re: IFrame Print Styles In CRM

can i use this code to resize the Iframe, if so where do i put it, in the onload event of the form? i have struggled with that with 2 clients already.

IFRAME.custom

{

width:    100%;

height:    100%;

border:    1px solid #7b9ebd;

behavior:   url(/_forms/controls/IFRAME.htc);

}

Wednesday, September 12, 2007 8:54 AM by plc

# re: IFrame Print Styles In CRM

I would suggest setting the size/location of the IFRAME in the entity's form customization (click settings, customizations, double click the entity in question, double click form).  You can say how big it is there.  Rows, placement and width are all customizable from there.  Resizing it from the style sheet would be tricky and I wouldn't recommend it unless you had a ninja grip on CSS and the CRM source code.

Friday, September 14, 2007 4:41 PM by vbullinger

# re: CRM JScript Bug

I wish I read your blog earlier, today I spent over an hour trying to count up all the { } that almost blind me.

Monday, October 29, 2007 3:43 PM by uew

# re: Writing A CRM Callout Assembly: A How To

Hi,

Do I have to use VS 2003 to create callouts

Regards

Wednesday, October 31, 2007 9:35 AM by mgad

# re: Writing A CRM Callout Assembly: A How To

To mgad;

Do you "have" to use VS 2003 to create callouts?  I've heard no, you don't, but I've never gotten one to work in VS 2005 (or later).  CRM was written in VS 2003 with ASP.Net 1.1, so it (for some reason) seems to be easier to write callouts in VS 2003.  I would strongly suggest it, since several people I know have tried to write them in VS 2005 with absolutely zero success, even though they very confidently said they'd get it to work.  I know you should always use the latest technologies when doing things, but still, don't waste your time.

Wednesday, October 31, 2007 10:13 AM by vbullinger

# re: Writing A CRM Callout Assembly: A How To

thank you, vince. It was of great help!

By the way, for those, who are lazy enough, I'd recommend:

http://blogs.msdn.com/arash/archive/2006/08/25/use-visual-studio-2005-to-build-crm-callouts.aspx

I use it being happy to have found it once!

Thursday, November 01, 2007 11:23 AM by Vadim

# re: Writing A CRM Callout Assembly: A How To

To Vadim;

I've had that post sent to many on so many occasions, it's not even funny.  And not one of those people have gotten it to work.  So, while it may be possible, please a) don't send me another link to it, I found it on my own when I first wrote a callout and didn't get it to work and b) try it first.  If you get it to work, post what you figured out and what we all might be missing.  IN THAT VERY POST, YOU HAVE THIS PARAGRAPH:

"However, building Callouts for CRM V3.0 is officially supported only on VS 2003.  The explanation is rather simple.  CRM platform itself is built on .NET Framework V1.1 and VS 2003.  The platform runs as part of the IIS process and Callouts are loaded in that process when web services are called.  Common Language Runtime (CLR) does not support loading two versions of .NET code into the same process (from my old days at VS team there are a lot of reasons for that including complexity of versioning, isolation and upgrade, etc).  So if you build and compile your Callout using VS 2005, the callout cannot be loaded by our platform and you get an error."

Please!  Don't waste your time.  You now have the reasoning behind not wasting your time, so please don't do it.  And I really don't want to hear about that blog post again :)

Thursday, November 01, 2007 11:33 AM by vbullinger

# re: Writing A CRM Callout Assembly: A How To

To mgad,

You don't have to use VS 2003 but it is recommended.  I have successfully deployed callouts using VS 2005.  However, you have to deploy them using the .NET 1.1 (1.0) Framework.  VS 2003 uses the 1.1 Framework natively but VS 2005 uses the 2.0 Framework.  You can use a product called MSbee to build VS2005 projects in .NET 1.1 but it's a pain in the @ss.

Matt

Thursday, November 29, 2007 1:49 PM by Matt Skelton

# re: Accessing Parent DataItem of a Child DataItem

I have a similar problem, but I need to access the outer repeater's e.item.dataitem within the inner repeater. Let me explain this a bit:

I have some students which I show in a datalist. In the item_databound event of the datalist, I get the studentID through e.Item.DataItem("studentID"). The outer datalist contains another datalist inside it that will show the years the student is there in the college. Inside the 2nd datalist, I have a datagrid that will show the attendance of the student. So it is a report of student attendance displayed by student, by year. I need the studentID inside the 2nd datalists ItemDataBound event so that I can bind the datagrid. How can I obtain the studentID from the parent datalist's e.Item.DataItem("studentID") ?? Let me know if you need more info.

Friday, December 07, 2007 4:35 AM by WebTenet

# re: Accessing Parent DataItem of a Child DataItem

To WebTenet:

This seems to be the same issue.  If I'm missing something, then step through the databinding event handler of the outer repeater and look at the properties to find the associated datalist and its associated DataItem.

Friday, December 07, 2007 11:17 AM by vbullinger

# re: Accessing Parent DataItem of a Child DataItem

Vince is on the ball on this one.  I scoured Google and eventually did find the answer in another place but didn't realize it until I saw this page because the answer was missing something important.  The key is in casting the parent object to the correct type, otherwise you'll get an exception, normally:

'DataItem' is not a member of 'System.Web.UI.Control'

In VB, you can do it like this:

Value='<%# DirectCast(Container.Parent.Parent, RepeaterItem).DataItem.MyPropertyName #%>'

Wednesday, December 19, 2007 2:58 PM by John Tolle

# re: Modifying Queue Views in CRM

Hi Vince,

fantastic to be able to change the queue view and also easy to call the view manager with this parameter. but how do you in the end publish this customization to become active?

appreciated

markus

Thursday, December 27, 2007 4:24 AM by Markus Schmitz

# re: Modifying Queue Views in CRM

Actually I take my questionback. I could publish the changed queue, by simply publishing all customizations, instead of selecting one. I tried this in the beginning, but git confused, because my test case the "Assigned queue" did not show any changes. Funny enough the "Assigned queue" does not seem to be a queue, because the actual queues show the customizations properly.

Anyway, I did not achieve the desired effect. My problem is, that we are abusing the queues as email system inboxes, to such an extreme, that we are not using outlook anymore, but receive and send emails in CRM only. Unfortunately the queues do not show the from-adress of an incoming email activity. This makes our approach a bit wacky. Also customizing it the queue view did not help, since the queue itself does not have the sender information. The creator seems to be always "system" and not the contact, who send the mail.

Tough luck,

I guess,

Markus

Thursday, December 27, 2007 6:11 AM by Markus Schmitz

# re: Writing A CRM Callout Assembly: A How To

Hi

I have an entity that when a field is updated my callout performs a calculation and updates another field to a new value.

This all works ok,  however the performance is really bad.

Im getting the following error in the event log

postupdate, exception: Microsoft.Crm.Callout.CrmCalloutException: invocation timed out.

  at Microsoft.Crm.Callout.CalloutHost.PostUpdate(CalloutUserContext userContext, CalloutEntityContext entityContext)

Any ideas

Cheers

John

Wednesday, March 05, 2008 8:57 AM by John Leatherbarrow

# re: Writing A CRM Callout Assembly: A How To

To John Leatherbarrow:

You sure you don't want to try to do this in JScript?

After that, I'd have to see your code to be able to debug this.  It gets inside of your code and then hangs, so... it's hard to tell you your problem.  It doesn't have anything to do with the callout or the connection.

Wednesday, March 05, 2008 12:44 PM by vbullinger

# re: Modifying Queue Views in CRM

hi, can u guide me in hiding the queue for an user, as iam new to CRM iam stuck with that

Wednesday, April 16, 2008 2:04 AM by vaani

# re: Writing A CRM Callout Assembly: A How To

Hi,good site!

Wednesday, April 23, 2008 9:32 AM by availsoto

# re: MaxRequestLength Exceeded Problem

Nope but we're in April 2008 and still no solution...

Thursday, April 24, 2008 5:39 AM by Cybafelo

# re: Modifying Queue Views in CRM

"I then hide all queues and only show them when the user has access to them"

But how do you hide and show queues? Can you explain this?

Monday, May 05, 2008 7:15 AM by slonk0

# re: Modifying Queue Views in CRM

Thanks - this is cool and helped me a lot!

But - I would like to show the owner of the "Regarding" associated record.

But when you modify columns on the queue view, you only get a small amount of fields - and not fields from related records.

Any help on this issue?

Thanks in advance.

Monday, May 26, 2008 4:29 AM by henrik

# re: Modifying Queue Views in CRM

"I then hide all queues and only show them when the user has access to them"

But how do you hide and show queues? Can you explain this?

Can you show code sample...

Tuesday, June 17, 2008 9:35 AM by karisma

# re: Modifying Queue Views in CRM

hi

do you know how to modified column createdon to show date with time?

Thank you

Best regards

Thom

Thursday, July 24, 2008 8:52 AM by Thom

# re: Adding Transparency to SWFObjects

Pretty nice site, wants to see much more on it! :)

Wednesday, August 20, 2008 5:19 AM by John Williams ok

# re: Modifying Queue Views in CRM

A very interesting and infrormative article.

In the first step (showing the number of items in a Queue) you say "I parse through the html returned by the dll and then send the queue name (from some TD in some table somewhere in the code) to the second method mentioned before and inject some text in the TD's innerText." Can you explain a bit more about how you do this. I can write the webservice that returns the number of items in a given queue, but can't see at what point to call it. Eg, is it from an onClick() event handler on the Queues navtree item? Any info about this potentially very useful technique would be really appreciated.

Regards

Mike Feingold

Sunday, September 07, 2008 5:05 PM by Mike Feingold

# re: Accessing Parent DataItem of a Child DataItem

Thank you!  I've been looking awhile on how to do this.  It's very helpful and simple.

Tuesday, September 09, 2008 8:41 PM by ljardin@hotmail.com

# Bookmarks about Blogs

Pingback from  Bookmarks about Blogs

Friday, January 16, 2009 6:15 PM by Bookmarks about Blogs

# DataBinding Nidificato... COME FARE? | hilpers

Pingback from  DataBinding Nidificato... COME FARE? | hilpers

Wednesday, January 21, 2009 9:21 AM by DataBinding Nidificato... COME FARE? | hilpers

# Displaying account's parent on contact form | keyongtech

Pingback from  Displaying account's parent on contact form | keyongtech

Wednesday, January 21, 2009 9:37 PM by Displaying account's parent on contact form | keyongtech