Notifications
Announcements
No record found.
Hi,
How to call javascript function on lead parent form from lead qualify dialog box? We are unable to get the parent form object from lead qualify dialog screen.
*This post is locked for comments
Refer below URL for accessing parent functionality through dialog box (unsupported, since customizing native CRM dialog box is not supported by MS CRM),
blogs.infinite-x.net/.../crm-2011-accessing-the-parent-form-from-a-child-form
bingsoft.wordpress.com/.../accessing-the-parent-form-xrm-page-in-crm-2011
If you just want to populate information from parent i.e. lead entity while qualifying lead
You can have a create plugin register it on Step QualifyLead on Lead Entity in Pre-Operation record and then update the context parameters as per requirement
Thanks,
Vijay
Hi Vijay, thanks for the prompt response.
We tried using above reference links to get the parent form object. 'window.top.opener.parent.Xrm.Page' is getting null for parent.
We wont to call javascript function available on web resource of lead form when lead will disqualified from lead qualify dialog screen. Lead disqualify screen will set a value on main lead form.
Any more inputs?
Whenever you disqualify the lead it save the Lead form, so you can have JS registered on save event to check if user initiated action to disqualify lead
Refer below URL for Save mode, in your case you need to check for savemode() equal to 15 on save event of lead
msdn.microsoft.com/.../gg509060.aspx
if your condition matches, then you can perform your desired operation.
Hi Vijay,
Let me explain you the flow.
1) User will click on qualify screen.
2) For disqualification he will select reason as 'Others'.
3) On selection of Others, javascript function will prompt for user input (using input box).
4) We have to set this user input on lead main form as rejection reason.
So issue is to set the javascript variable value on lead main form. We are not getting parent form object using window.top.opener.parent.Xrm and other options too.
Thanks for the response. I can have javascript function on disqualify lead event using savemode=15.
Any idea, how can I get the status reason selected on Qualify Lead aspx? If I try to get the status code using xrm.page context then I get the old status code i.e. 'New' and it is expected one as new value is not yet saved.
I need status code or discqualification reason selected on qualify lead aspx page on main lead form javascript.
As CRM standard functionality you cannot get control over the “Disqualify Lead” dialog box and customizing it will be treated as unsupported.
I’ll suggest you to have a pre-operation plugin registered on Lead save event, where you can check the status and update field accordingly. Doing this on form load (once save performed) you will get required value on respective field (write your logic in plugin to fetch and set value in target).
Hope this help.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2