locked
pass entity field through URL RRS feed

  • Question

  • hi, i have created a button on isv and passing a 'lookup' to a 'customer'  on other entity.

    the paramter passing code:

    var params =[
    '?customerid='
    ,crmForm.all.regardingobjectid.DataValue[0].id
    ,'&customeridname='
    ,crmForm.all.regardingobjectid.DataValue[0].name
    ].join('');

    after this string pass to the other entity, the type is wrong (the regardingobjectid should be an acocunt), but it showed as a contact. then i tried to add customeridtype, but the url unable to find this entry through (since url can only pass paramters to some fields that displayed on the form)

    thus, how can i correctly pass the paramter using url? or i can only handle those in form onload?

    thanks

     

    Tuesday, January 25, 2011 3:55 AM

All replies

  • Tuesday, January 25, 2011 1:40 PM
  • When setting customer it is important to set the type because the lookup data can come from Account or Contact  so you can set the type as follows

    // The entity type code of the lookup: 1=account, 2= contact.

    var params =[
    '?customerid='
    ,crmForm.all.regardingobjectid.DataValue[0].id
    ,'&customeridname='

    ,crmForm.all.regardingobjectid.DataValue[0].name

    ,'&type='
    ,crmForm.all.regardingobjectid.DataValue[0].type
    ].join('');


    Hope this helps. Amar

    CRM Forum Guidance on how to Help Us Help You

    Tuesday, January 25, 2011 7:10 PM
  • hi, however my case is that the entity A contained 2 fields that wanted to pass to entity B, where one of them is account and the other one is contact. for the code that you provided, there is only a single type. how can it achieve the 2 fields passing with different type?

     

    thanks

    Friday, January 28, 2011 6:38 AM
  • Hi

    it is  possible to disable the parameter filter in CRM to pass custom parameters. Please check the following URL

    http://www.eggheadcafe.com/software/aspnet/31131911/crm-parameter-filter--invalid-parameter.aspx


    Hope this helps. Amar

    CRM Forum Guidance on how to Help Us Help You

    Wednesday, February 2, 2011 10:31 PM