FORUMS

c360 Forums
 Home        Members    Calendar    Who's On

Welcome Guest ( Login | Register )
      



LookupItem does not link to CRM websiteExpand / Collapse
Message
Posted 2/7/2007 10:33:25 AMPost #1098
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
I'm having trouble with the Lookup control. I added a lookup item using the following syntax.

lookUp.Items.Add(ControlFactory.CreateLookupItem(1, "{" + oAccount.accountid.Value.ToString() + "}", oAccount.name));

When the link in the lookup is pressed it does not open the entity on the CRM server. It seems to be using the servername and port of the page the lookup is on is running on, rather than the CrmUrl value in c360.config file. For example the url referenced when running on localhost is http://localhost:3333/sfa/accts/edit.aspx?id={62c56cb7-f773-db11-af2f-000c29b74382}&  when it should be http://CrmUrl/sfa/accts/edit.aspx?id={62C56CB7-F773-DB11-AF2F-000C29B74382}

Are you able to reproduce this?

Posted 2/8/2007 1:58:35 PMPost #1100
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru

Make sure you have spelled the "CrmUrl" key correctly (careful it's case sensitive). Also, sometimes the VS.NET developement web site sometimes doesn't automatically detect changes to the c360.config and I sometimes have to stop and restart it to make sure my changes take effect immediatly.

 

Posted 2/16/2007 5:41:46 AMPost #1155
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
The CrmUrl key is not the problem, see below. I'm also using links in grids and they open entities on the server specified.

<add key="CrmUrl" value="http://DevServerIP/" />

Posted 2/16/2007 8:55:25 AMPost #1157
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
My dev environement is very similar to yours: I am running my code on a VS.NET web site (which listens to IP port 24816) and I have CRM running on IIS on port 5555.

I am able to reproduce the problem you are describing at will when I:

  1. Omit the CrmUrl from my config file. In this situation, when I click on a lookupItem the URL is http://localhost:24816/sfa/accts/blablabla
  2. Mistype the name of the key. Since this key is in a XML file, the name is case sensitive so it's easy to make a mistake.
  3. Type an invalid value for this key. In this situation, when I click on a lookupitem the URL is http://wrongservername/sfa/accts/blablabla

However, when I correctly enter the key in the config file with the appropriate value it works perfectly. In this situation, the URL is http://localhost:5555/sfa/accts/blablabla

The CrmUrl is the one and only key that controls the URL when our SDK needs to open CRM pages.

 

Posted 2/16/2007 9:45:42 AMPost #1159
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Did you test this by opening an item added in code or by clicking the icon and selecting an item to place in the lookup? When I add an item using the icon it links to the correct server. When I add an item in code it doesn't. I tried changing the value in "CrmUrl" and it did effect the links I have in grids, but not items added to the lookup in code.
Posted 2/16/2007 11:36:56 AMPost #1163
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
You're right: I have been testing by manually selecting an item and them clicking on it. I was not programatically adding the item. I didn't realize this was the main issue in your situation

I will test adding items programatically this afternoon and will let you know the result.

 

Posted 2/16/2007 3:19:26 PMPost #1168
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
I just tried adding an item programmatically like you did and I observe the exact same problem.

This is indeed a problem with our SDK and I have reported it as defect number DE1570

 

Posted 2/16/2007 4:29:56 PMPost #1174
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Thank you
Posted 2/17/2007 8:18:53 AMPost #1177
 

c360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expertc360 Product Expert
Attached is a workaround that you could try until the issue is fixed.

It is an adjusted c360 SDK sample that shows how to fix the javascript code that opens the lookup item.

(For insiders: First tried to change the onclick using the DOM, but for some reason the click on the SPAN element stops functioning....)


  Post Attachments 
Exercise_4_07_FixLookupItemUrls.zip (178 views, 1.16 KB)
Posted 3/22/2007 6:22:34 AMPost #1308
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
Thanks for the fix. We ended up waiting for the next toolkit release
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: kanika.jackson, Ken Champion

PermissionsExpand / Collapse