locked
Custom Entity RRS feed

  • Question

  • Hi all,

    I have created a custom entity called 'suspect'. I have 'Business phone' as a field in suspect. If I want to create a Phone call activity in the suspect entity, the phone number field in phone call activity is automatically filled with the value of the 'Business Phone' field in suspect entity.

    Regards,
    Rajsekhar.
    Wednesday, April 8, 2009 11:20 AM

Answers

  • I am not clear about your question.

    If you want the phone no to be automatically populated then

    in the phone call onload js 
    use  the follwing code to assign to phone no field
    window.opener.parent.document.crmForm.all.BusinessPhone.DataValue;
    • Marked as answer by Golden Fish Wednesday, April 8, 2009 12:26 PM
    Wednesday, April 8, 2009 12:11 PM

All replies

  • Try Field Mappings from Suspect to Activites
    Tiaan van Niekerk http://crmdelacreme.blogspot.com Skype:tiaan.van.niekerk1
    Wednesday, April 8, 2009 11:48 AM
  • No mappings allowed from suspect to activites
    Wednesday, April 8, 2009 11:49 AM
  • I am not clear about your question.

    If you want the phone no to be automatically populated then

    in the phone call onload js 
    use  the follwing code to assign to phone no field
    window.opener.parent.document.crmForm.all.BusinessPhone.DataValue;
    • Marked as answer by Golden Fish Wednesday, April 8, 2009 12:26 PM
    Wednesday, April 8, 2009 12:11 PM
  • Saw that!
    This looks like it is embedded in CRM

    http://www.askcrm.com/Home/tabid/866/EntryID/75/Default.aspx using a workflow.

    else
    Plugin to call guid from the lookup and populate the phone number field


    Tiaan van Niekerk http://crmdelacreme.blogspot.com Skype:tiaan.van.niekerk1
    Wednesday, April 8, 2009 12:13 PM
  • Hi raji,

    Thanks for your reply. I want exactly what you explained.

    Regards,
    Rajsekhar.
    Wednesday, April 8, 2009 12:25 PM
  • Hi raji,

    My problem is almost solved but a small issue is there. The following is the code what i have written in phonecall onload event

    var x=window.opener.parent.document.crmForm.all.new_businessphone.DataValue;
    if(x!='null')
    {
    crmForm.all.phonenumber.DataValue=x;
    }

    when I am trying to create a phone call activity from 'Workplace-->New Activity-->Phonecall' then the following error is displayed.

    Error:'window.opener.parent.document.crmForm.all' is null or not an object.

    Please help.

    Regards,
    Rajsekhar.
    Thursday, April 9, 2009 4:56 AM
  • Hi,

    Try this

    if (

        (window.opener != null) &&

        (window.opener.parent != null) &&

        (window.opener.parent.document != null) &&

        (window.opener.parent.document.crmForm != null))

     

    {
    var x=window.opener.parent.document.crmForm.all.new_businessphone.DataValue;
    if(x!='null')
    {
    crmForm.all.phonenumber.DataValue=x;
    }


    }



    Regards
    Raji

    • Edited by Raji kambar Thursday, April 9, 2009 5:24 AM redundant
    Thursday, April 9, 2009 5:07 AM
  • Hi,

    I am getting the same problem what I have explained earlier.

    Regards,
    Rajsekhar. 

    Thursday, April 9, 2009 7:51 AM
  • Hi raji,

    I got the solution. The following is the code. Thanks for your help.


    if(window.opener.parent.document.crmForm!=undefined)
    {
    var ph_num=window.opener.parent.document.crmForm.all.new_businessphone.DataValue;
    if(ph_num!='null')
    {
    crmForm.all.phonenumber.DataValue=ph_num;
    }
    }

    Regards,
    Rajsekhar
    Thursday, April 9, 2009 8:20 AM