Hi, I'm new to CRM customization and JavaScript, and am hoping I could get some help from experts here:
The goal here is to:
1. Have a button on a form of the Ticket entity.
2. When the button is clicked from a ticket, a new Email form will show up in a new window with pre-populated fields including 'From', 'To', 'Regarding', and 'Description'
3. In the new email form - 'To' refers to the customer; 'Regarding' refers to the ticket title; 'Description' needs to include a default email template; all fields except 'Description' are look up fields.
4. the form should look like below:
I've found various articles online and this seems to match my goal the most - https://community.dynamics.com/crm/f/117/t/273017
I've also created a customized button and was able to publish my first Jscript passing string values from the Ticket entity. However, I'm having trouble populating all the look up fields and inserting an email template (To, Regarding, Description); The syntax I'm using is Xrm.Utility.openEntityForm(name,id,parameters,windowOptions) and below is what I've had so far:
Also, if I click an existing ticket - go to timeline - click Activities tab and select 'E-mail', then the page would go to an email form with the all the pre-populated fields I'm looking for; however I would need the email form to show up in a new window and it seems like the timeline tab is an OOB feature and thus I am not sure if I could customize this part of the form?
One last thing - not sure if there is a better way to open a new email form in a new window rather than clicking a customized bottom on a ticket form. Any recommendation is welcome. Thank you all in advance :)
*This post is locked for comments
Hi Kole Huang,
I have tried same approach on CRM online and unfortunately using js its not working. I would suggest you to open email record with the help of JS and custom action.
Try:
Additionally, if you're on v9.X, try out the new libraries. https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-navigation/openform
If helpful please marked as verified answer.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156