Skip to main content

Hello,

I currently have a custom event and event action that sends an email out. I would like to have a custom attribute on the custom event that gets the email we need to send to. This is currently what I have

Sadly, this ends up in an error, no matter the formatting. I’ve tried just using BusinessOpportunityHandling.GetDefaultsForSendMail and multiple different formats, but nothing works. Can someone please show me how to properly do this? all of the ifs documentation shows are actual API calls like:

but when you go to API Explorer in IFS Cloud, there are no actual “APIs” like this, only projections, which as I understand it, are oData API’s. 

There’s no other documentation for IFS. Any and all advise would be greatly appreciated.

Thanks,
Bryan

To add to this, the documentation for : https://docs.ifs.com/techdocs/21r2/050_development/024_integration/015_connect/025_plsql_methods/ isn’t very helpful, and the link for the PLSQL_Document_API package https://docs.ifs.com/techdocs/21r2/050_development/200_all_ref_manuals/api_ref_itd/plsqlap/document_methods/index.md is broken (shocker)


Not seeing the complete event, I think you use a before commitment situation (as I see &NEW:...). However that opportunity doesn't exist yet, so my guess is that the email can't be retrieved and you end up with a blank mail and hence an error.

Is it an option to test this using a hard coded mail address to be concatenated with a ';’ or ',’ and then you api call and see if a mail is send at that moment?

Or something with a nvl(napi call], lhard coded mail])

Have you tried to use the after commitment?

Next thought, but I don't know how that works would be a BPA workflow.


Hi @eqbstal 

I’m using the event that gets triggered when an opportunity closes, so the opportunity has already been created.

I have tested with a hardcoded value, and it works, but sadly it’s just the server method that I’m struggling with. 

I’m not familiar with nvl, what is that exactly and how can I find more about it?

Sadly, workflows are something I’m more familiar with, I could use projection calls all day but IFS doesn’t think workflows need email functionality for some reason…. which I disagree with.
Thanks,
Bryan


Hi @eqbstal 

I’m using the event that gets triggered when an opportunity closes, so the opportunity has already been created.

I have tested with a hardcoded value, and it works, but sadly it’s just the server method that I’m struggling with. 

I’m not familiar with nvl, what is that exactly and how can I find more about it?

Sadly, workflows are something I’m more familiar with, I could use projection calls all day but IFS doesn’t think workflows need email functionality for some reason…. which I disagree with.
Thanks,
Bryan

Please log an idea - https://community.ifs.com/ideas - about sending emails through the workflow config. I couldn’t find one. It should really be supported!


@bdoucette With regards to the null value (nvl) you can read more about this via https://www.techonthenet.com/oracle/functions/nvl.php

This is by the way my source of knowledge for a lot of PLSQL related material.

With regards to the mail. According to help text of Camunda one should use Java code to send out a mail.


HI @eqbstal

Ah I see, my mistake. I’ve used these before too so of course I should have known what it was. 

Are Camunda Java mail tasks tied into the emailer in IFS Cloud? If we can trigger the mail sender that we have active in IFS Cloud, then that would be a good alternative. I didn’t see any IFS documentation about that, so I assumed it wasn’t going to work. Andre helped me get my emailing event action working so I’ll keep that in mind next time as event actions are fairly limited.
That’s helpful information to pursue in the future though, thanks!
Bryan


@bdoucette Would be great to at least know that it is possible to use Java code to send a mail. I only read it, not at all sure if it is doable in an IFS environment.

I'm stepping away from the usage of events as, at least the SQL block related events are deprecated in the near future. Only thing that we can used in future IFS Cloud versions will be BPA. So, in my view it makes sense to spend some extra time to learn that module/component.


Hi @eqbstal 

That’s fair, I should do the same, but from what I’ve seen, a lot of the functionality is not there. Even scheduling workflows to run daily, weekly, hourly, etc is something that IFS hasn’t implemented yet.

There is a function that you can use to create a database task called “FND_WORKFLOW_CONNECTION_API.START_WORKFLOW” which would be perfect to schedule a workflow, but sadly it doesn’t seem like it works at the moment(at least from what I’ve tried). I posted a question about it on this forum but so far no one seems to have used it before, or they haven’t responded.

Hopefully the emailing portion gets cleaned up, or documented as I cannot find any IFS specific documentation on how to email via a workflow. I’ve posted questions about that as well and an IFS Employee told me to just use an event action to email…

Thanks,
Bryan


Reply