Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
I want to add an actionlink in Purchaseorders to send an e-mail from there. There is a UI10 field for the account, so I can modify the business action javascript to get the account ID from there. The problem is, is that the window is not present in the DOM. Is there an easy way to get that going and can I use fields from the PurchaseOrder as mergefields in templates I subsequently select?
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
I suppose you mean in the list view, because the screen is present in the detail view. My first suggestion would be to add the action on the detail view. If you need the code in the listview, add an email field to the module and the code will be included then add a business action with MailJS (search for that in the link label and duplicate one of the existing records)
If you send in the ID of the PO (as the send email with PDF action probably does) you will be able to merge with the fields of the PO and the related account
Joe
TSolucio
Posts: 855
Threads: 238
Joined: Nov 2015
Reputation:
96
I can confirm you can't just add a businessaction to the PurchaseOrders. The problem is that there is no DIV with an ID of 'sendmail_cont', that the JS code is looking for, so the DOM is not prepared for sending e-mails from PurchaseOrders. How could we fix this?
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
To activate email support on a module you must:
- have an email field on the module: for example add a custom email field and fill it in with an update workflow
- add MailJS action link to load the necessary javascript code: simply duplicate any of the other business actions
- add the send email link: duplicate and adapt one of the other business actions
HTH
Joe
TSolucio