locked
CRM 2011: Passing values between dilog and java script RRS feed

  • Question

  • Hi all,

    Is there anyway to pass values between dialogs and the java script that has called the dilaog??

    If I have used javascript to call a dilaog to create a new record, can I pass the GUID of the newly created record back to javascript in automate a process that can't be automated using dialogs. i.e. I need to attach the child records of the record that called the dilog to the newly created record

    Best regards..

    Monday, June 11, 2012 1:02 PM

Answers

  • You cannot pass values directly in client-side code, but you should be able to retrieve the data you want with a call to the CRM web services. A dialog runs synchronously, so if you launch the dialog in a modal window (using window.showModalDialog), you can be certain that it will have completed when your next lines of code execute. You could then make a call using the SOAP or REST endpoint to find the record(s) created by the dialog

    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk


    Monday, June 11, 2012 1:21 PM
    Moderator

All replies

  • You cannot pass values directly in client-side code, but you should be able to retrieve the data you want with a call to the CRM web services. A dialog runs synchronously, so if you launch the dialog in a modal window (using window.showModalDialog), you can be certain that it will have completed when your next lines of code execute. You could then make a call using the SOAP or REST endpoint to find the record(s) created by the dialog

    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk


    Monday, June 11, 2012 1:21 PM
    Moderator
  • How to stop executing the rest of the code till the dialog is completed ?

    And how could I retreive the GUID of the record that has been created using the dialog ?

    Monday, June 11, 2012 1:28 PM