locked
CRM and Visual Studio RRS feed

  • Question

  • I have a project in visual studio 2008 that works like a keygenerator. It activates clients registration codes for a software package that i have created.

     

    I have been asked to integrate the registration wizard of my project with our companies CRM.

     

    Its a simple form that asks the client for there activation code, then it generates the user a registration code.

     

    What i want to know is how do i get that to work on the CRM.  I am new to the plug-in creating and such.

     

    Thanks.

     

    DK

     

    Tuesday, October 7, 2008 12:34 PM

Answers

  • Hi Diane,

    Windows forms may be used to query MS CRM using the API's (web services) however you wouldn' t be able to host that windows form from within MS CRM. So yes, you will need to create a web form to display the related account info.

    I imagine the following scenario:
    1. Customer calls in, support person searches for their record, finds it or creates a new account for the customer.
    2. Support person clicks on 'link' from within your account (button on tab bar or left navbar link) which opens up the web form. You pass to this web form the accountid which is a GUID uniquely identifying the account.
    3. You generate the code, read this out to the customer and at the same time saves the code to the account form using the web services and sets a status on the account as 'activated'.

    To retrieve the accountid from your form you will use Request.Querystring["oID"], where oID is the parameter storing your guid (in string format). You may then update your accout with

    account a = new account();
    a.accountid = new Key();
    a.accountid.Value = Guid(oID);
    a.activated = new CRMBoolean();
    a.activated.Value = true;
    CrmService.Update(a);

    Give me a shout if you need more help,

    Cheers,

    Karlo




    Wednesday, October 8, 2008 8:12 AM

All replies

  •  

    You need to review the CRM SDK.

     

    Search for it at www.microsoft.com/downloads.

     

     

     

    Tuesday, October 7, 2008 2:33 PM
    Moderator
  • Hi Maka,

    You seemed to suggest this is a web form? Is this specific to a record (e.g. a customer)? If a web page, you may create using a typical aspx page and host from within MSCRM. You retrieve the related entity's ID with
    request.questystring["oID"], which can then be used to query the MSCRM web services. You will need to create a link to the web page from within MSCRM by exporting the ISV.config, modifying the customizations.xml and re-importing.

              <NavBar>
                <NavBarItem Icon="/_imgs/ico_18_debug.gif" Url="http://www.microsoft.com" Id="navMS">
                  <Titles>
                    <Title LCID="1033" Text="My Link" />
                  </Titles>
                </NavBarItem>
              </NavBar>

    The following xml within your <entity></entity> tabs will display a link to www.microsoft.com

    Any help?

    Karlo




    Tuesday, October 7, 2008 7:49 PM
  • Hi Karlo

     

    The form is actually a windows form but is not a problem to convert it to web.

     

    Ive been through the CRM 4.0 SDK, didnt find any solutions in there.

     

    So what your saying is that i can just put a link in the CRM to link to the .aspx page and let the code run on the page???


    It is for customers that purchase our software that want to activate the product. There details will also be saved like a customer account. So they will call in and the support person working with that client will log the clients information on the CRM and then generate the clients activation code....

     

    Could this all be stored together or how would that work >?

     

    Kind Regards]

     

    D.Kruger

    Wednesday, October 8, 2008 6:36 AM
  • Hi Diane,

    Windows forms may be used to query MS CRM using the API's (web services) however you wouldn' t be able to host that windows form from within MS CRM. So yes, you will need to create a web form to display the related account info.

    I imagine the following scenario:
    1. Customer calls in, support person searches for their record, finds it or creates a new account for the customer.
    2. Support person clicks on 'link' from within your account (button on tab bar or left navbar link) which opens up the web form. You pass to this web form the accountid which is a GUID uniquely identifying the account.
    3. You generate the code, read this out to the customer and at the same time saves the code to the account form using the web services and sets a status on the account as 'activated'.

    To retrieve the accountid from your form you will use Request.Querystring["oID"], where oID is the parameter storing your guid (in string format). You may then update your accout with

    account a = new account();
    a.accountid = new Key();
    a.accountid.Value = Guid(oID);
    a.activated = new CRMBoolean();
    a.activated.Value = true;
    CrmService.Update(a);

    Give me a shout if you need more help,

    Cheers,

    Karlo




    Wednesday, October 8, 2008 8:12 AM
  • Hi Karlo

     

    Ok so i created the web form and its working properly.

    I see on the CRM there has already been a page set up with attributes concerning Serial keys etc.

     

    So what i did was to copy the RegKey.aspx page to the wwwroot of the CRM. so it wld loook something like this.

     

    http://CRM/PayDay/RegKey.aspx

     

    I added a iFrame to the page that im going to use for the Registration details.

     

    but when i set the url for the iFrame i receive and error. but when i set the url to a website then it works fine.

     

     

     

     

     

    Wednesday, October 8, 2008 10:42 AM
  • Hi Diane,

    Let me understand:

    1. Your ASPX page works independently from MS CRM. i.e. you are able to browse to the ASPX page from internet explorer?
    2. In your IFRAME, you can reference a website e.g. www.microsoft.com, however you are unable to reference your application (above in 1) which you can otherwise reference when browsing to it?

    If the above two are correct, could you try not use an IFRAME? You can open the form up through a custom toolbar button or left navbar link. I would like to confirm the problem is specific to the IFRAME and not your custom application.

    Thanks,
    Karlo


    Wednesday, October 8, 2008 9:58 PM
  •  

    Hi Karlo

     

    I have everything working in order now.

     

    1. Created another web site in wwwroot of the server hosting the CRM

    2. Published my vb solution to that folder.

    3. Set the url of the iFrame to the url of the new website.

     

    Now i have another problem.

     

    this is how the form looks

    <CRM page>

     

    Serial number :   ______________

    Activation Code: _______________

     

    <iFrame> the serial number would be entered here and the activation code generated </iFrame>

     

    How would i get the values that i entered and generated into the iFrame. into the fields on the crm page. ???

     

    D.Kruger

     

     

     

     

    Thursday, October 9, 2008 8:17 AM
  • Hi Diane,

    You may be able to access the parent of the form hosted in the IFRAME through Javascript. You can access the parent form with
    the following:

    var oParent = window.parent.document.all.crmForm;

    Update as you would normally with a field in MSCRM (see sdk for examples). The onus is still on the user to save the parent form howerver.


    If vital that users save this field and then this field cannot be modified by a user manally, I would update the parent entity through the SDK. That way you are assured that the parent record is updated. You may even wish to disable the key field on the MSCRM form such that it cannot be updated manually by a user.

    Cheers,

    Karlo

    Thursday, October 9, 2008 1:17 PM
  • Hi all,

       I am also doing similar thing, I have published the web application and calling it in iFrame. But the problem is I have CRM web reference in my application and this application is built in my development server and I am trying to deploy the same in my production server but it is not working. Please help me how do I resolve this.


    Thanks &regards,

    Dyamanagowda

    Tuesday, January 27, 2009 6:35 AM