none
Setting the QueryString value of a new application in Agentdesktop code. RRS feed

  • Question

  • Hi,

    I need help regarding an issue i m facing in CCF.

    I am trying to integrate MS CRM 3.0 with CCF, i search customers (Accounts in MSCRM)by id (eg. 1) and i get the result. Now when i select the record, i want the Guid value to be appended to the edit.aspx url of MSCRM aacounts.

    I have created a new application in Admin console and set the querystring as Guid=%guid, where Guid is the column of a new table in  CCF DB.

    Where/How do i set the guid value in Agent Desktop Solution?

    Friday, January 19, 2007 8:22 AM

All replies

  • You would need to add guid to the Context for it to be picked up by the query string..
    context["guid"] = Your lookup result.

    as to when to set it..  That depends on where your picking up the guild from.

    the Context var that comes into your code via the NotifyContextChange Event is a pointer to the shared context.  The original context for a session is created and set in SetContext in the Desktop.cs file.  if you want to set the context somwhere else, say your web app adapter or a hidden control, you can update the global context and issue a NotifyContextChange event on your own.. Just keep in mind that the original context is a pointer.. so you will need to create a local context object, load it with the data from the other context, add your bit, then issue a FireContextChange event.  By doing that, all the other hosted applications will get a notification that a change was made to the context. 

    if all you need to do is update the context then fire the action that updated the page, then you just need to do context["guid"] = your result .. fireaction..

    Let me know if it works out for you :)

    Matt B.

    Friday, January 19, 2007 4:02 PM
    Moderator
  • Thanx Matt!

    Just to try, I hard coded a guid value say;

    context["id"] = "{384b65d7-bcaa-db11-b977-00096b12538b}";

    in the setcontext() method of desktop.cs.

    Is this not supposed to work?? It opens MSCRM web page for a new account and not the one specific to the above guid.

    Tuesday, January 23, 2007 2:38 PM
  • It depends.  if the URL is set as you expected it to be set then CCF did it job..

    MSCRM has wrappers built for most of their functions... I believe you actually need to go though AdvFind.aspx to get to the account from outside in MSCRM.. You should check with them on that.

    - Matt B.

    Tuesday, January 23, 2007 3:22 PM
    Moderator