locked
can we pass some value and call email activity RRS feed

  • Question

  • Hi,

    I want to pass subject and text from one entity form to email activity then call the email activity with those value. Is it possible.

    Regards,

    Noushad


    pnoushu@hotmail.com

    Thursday, December 12, 2013 7:01 AM

All replies

  • Hello Noushad,

    You can set mapping for email subject and other field from your source entity, you can do by editing relationship between your entity and email.


    Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Thursday, December 12, 2013 7:09 AM
    Moderator
  • Hi,

    Thank you for your reply.  Will the mapping affect other email activity.  what I mean to say sending mail from other entity.  I will appreciate if you could give send me mapping screen-shot.

    Regards,

    Noushad


    pnoushu@hotmail.com

    Thursday, December 12, 2013 7:28 AM
  • You need to get that URL to edit mapping for email activity because it seems you can't access mapping for activity type entity, but if you are working the onpremise deployment you should be able to get it (by editing mapping like we do for opportunity to Quote for custom fields). but other then this we have other options like

    > Write Js code on email onload and check for opener parent entity entity and reach related field and populate, you will validate specific entity in your code so that you will work for your specific entity only, something similar to this or you could also query that entity directly based on default populated fields to get other fields using rest or soap service call.

    Check : https://community.dynamics.com/crm/b/c5insightblog/archive/2012/07/30/use-javascript-with-parent-entity-forms-to-update-and-retrieve-records.aspx

    http://bingsoft.wordpress.com/2010/11/18/accessing-the-parent-form-xrm-page-in-crm-2011/

    > You can create a custom ribbon button to open email entity and populate fields by passing parameters in URL.

    HTH


    Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Thursday, December 12, 2013 8:03 AM
    Moderator
  • I want to send mail from custom entity by clicking on button.  I created custom entity, button.  When I click on the button it will call email activity.  I did set up default subject  as name of the account.  But I could not set regarding field by default.  I got error: Object expected when loading the form. Please help me to solve this issue.

    I have got few solution but it did not work.  Please find below the java code I have used for this.

    1.  I created 3 parameters. parameter_regardingid,parameter_regardingname,parameter_regardingtype on the form parameters as shown below screen-shot. Publish the form.

    2. I added below java code in form onload of custom entity and publish

    function Form_onload()
    {

    var param=Xrm.Page.context.getQueryStringParameters();
    var regardingId=param["parameter_regardingid"];
    var regardingName=param["parameter_regardingname"];
    var regardingType=param["parameter_regardingtype"];
    if (regardingId != undefined)
    {
    Xrm.Page.getAttribute(“regardingobjectid”).setValue([{id:regardingId, name:regardingName, entityType:regardingType}]);
    }

    }

    3. I added below java codes on button event.

    function sendmail()
    {

    var parameters = {};

    var Regarding = Xrm.Page.getAttribute(“regardingobjectid”).getValue();

    parameters["parameter_regardingid"] = Regarding[0].id;

    parameters["parameter_regardingname"] = Regarding[0].name;

    parameters["parameter_regardingtype"] = Regarding[0].entityType;

    Xrm.Utility.openEntityForm("email",null,parameters);

    }


    pnoushu@hotmail.com

    • Marked as answer by P Noushad Sunday, December 22, 2013 6:28 AM
    • Unmarked as answer by P Noushad Sunday, December 22, 2013 10:50 AM
    Thursday, December 19, 2013 1:39 PM
  • Hi,

    Please help to solve this issue I am getting below error.  I want to catpure regaring from custom entity to email entity when create new mail by click on button.  Please read the above mail to get more information.


    pnoushu@hotmail.com

    Sunday, December 22, 2013 10:54 AM
  • Hi,

    You need to isolate which object is missing, either by inserting a ton of alerts or by using some debugger. After that you can start identifying why that object is missing.

    Good Luck


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Monday, December 30, 2013 8:59 AM