locked
refer to quote form field from email form RRS feed

  • Question

  • In a quote I have an option to send a copy via email, by pressing a ribbon button, I need to populate a field on the email with a value from the quote form - how can I do this?

    Have tried 

    var parentCrmForm = window.opener.document.crmForm; alert(parentCrmForm.all.name.DataValue);

    but it errors.

    Any ideas?

    Matt

    Friday, November 8, 2013 11:53 AM

All replies

  • I hope you are using CRM 2011, try like :

    if (window.parent && window.parent.Xrm.Page.getAttribute("name").getValue()!=null) {
                        alert(window.parent.Xrm.Page.getAttribute("name").getValue());
                    }


    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !

    Friday, November 8, 2013 12:50 PM
  • Thanks for that.

    I receive the following message:

    Object doesn't support property or method 'getAttribute'

    regards,

    Matt

    Friday, November 8, 2013 1:13 PM
  • please check following link

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

    http://blog.crmvault.net/2011/06/crm-2011-get-parent-window-attribute.html

    if (window.top.opener.parent && window.top.opener.parent.Xrm.Page.getAttribute("name").getValue() != null) {
        alert(window.top.opener.parent.Xrm.Page.getAttribute("name").getValue());
    }


    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !



    • Edited by _Vikram Friday, November 8, 2013 1:36 PM
    Friday, November 8, 2013 1:32 PM