Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sending e-mails from purchaseorders
#1
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?
Reply
#2
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
Reply
#3
(10-07-2020, 10:36 PM)joebordes Wrote: 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

Well I need to test that again then, since I remember not having the screen available in the detailview DOM
Reply
#4
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?
Reply
#5
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)