Can not create invitation code on CRM for contacts ! RRS feed

  • Question

  • Hello Everyone,

    I installed customer portal and after deploy the web site i need to test it by invite someone to register So,

    When i try to generate an invitation code, nothing happen and an error appear:

    Microsoft Dynamics CRM Error Report Contents

       <Message>'CreateInvitationCode' is undefined</Message>

    Can you help me !


    Wednesday, March 13, 2013 8:39 AM

All replies

  • Fady,

    On your Contact form should be a jscript called "msa_contact_main.."

    Open that up and notice that the script is using CRM 4 syntax. (thanks so much for giving us a product with a built in time bomb microsoft!)

    That needs to change to the CRM 2011 syntax.
    Here's the change I had to make to mine (below). The two functions that create the UUID and the Expiration date dont need to be adjusted.

    function Form_onload()

    var username = Xrm.Page.data.entity.attributes.get('adx_username');

    var invitation = Xrm.Page.data.entity.attributes.get('adx_invitationcode');

    var expiry = Xrm.Page.data.entity.attributes.get('adx_invitationcodeexpirydate');

    if (username == null || invitation == null || expiry == null)
    alert('One of the required fields is missing from this form!');

    var usernamevalue = username.getValue();

    var invitationcode = invitation.getValue();

    if (usernamevalue == null || usernamevalue == '')
    if (invitationcode == null || invitationcode == '')
    var newInviteCode = createUUID();

    var newDateExp = createExpiryDate();


    Thursday, March 14, 2013 10:06 PM