Question

Custom Attribute in a Custom Event

  • 20 January 2022
  • 9 replies
  • 781 views

Badge +14

Hi All,

We have an custom event which should send an email when Application of Payment status is set to cancelled.

To email address will be fetching from a custom attribute CM_EMAIl:

IFSAPP.Pers_comms_Work_API.Get_Work_Email(&NEW:COMPANY,IFSAPP.Company_Person_Api.Get_Person_Emp_No(&NEW:COMPANY,IFSAPP.sales_contract_api.Get_Contract_Manager(&NEW:CONTRACT_NO)))

But this email is failing because of the error ‘  Mail To-address is not specified’.

This is APP 08 and checked the custom attribute with the documentation example as well.

Kindly advise me whether this Function requires permission to fetch value.

Event Action

 

Custom Event

 

Application Message

 

F1 Documentation

 


9 replies

Userlevel 6
Badge +14

Hi @MitDenukN 

  • Do you have access to the PLSQL procedure used to fetch the ‘CM_EMAIL’?
  • Please check and confirm that the email is correctly fetched by the function.
  • Please use RMB->Copy and past to get the variable to ‘To:’ field(as a best practice).

 

Userlevel 5
Badge +12

Hi All,

We have an custom event which should send an email when Application of Payment status is set to cancelled.

To email address will be fetching from a custom attribute CM_EMAIl:

IFSAPP.Pers_comms_Work_API.Get_Work_Email(&NEW:COMPANY,IFSAPP.Company_Person_Api.Get_Person_Emp_No(&NEW:COMPANY,IFSAPP.sales_contract_api.Get_Contract_Manager(&NEW:CONTRACT_NO)))

But this email is failing because of the error ‘  Mail To-address is not specified’.

This is APP 08 and checked the custom attribute with the documentation example as well.

Kindly advise me whether this Function requires permission to fetch value.

Event Action

 

Custom Event

 

Application Message

 

F1 Documentation

 

Hi @MitDenukN , Have you tried using the code bellow to get the e-mail?

 

E.g.: select &AO.fnd_user_property_api.Get_Value('userid', 'SMTP_MAIL_ADDRESS') from dual

Badge +14

Hi @Darshana Herath , Thank you for the response.

It is fetching data when I execute it from database.

 

Badge +14

Hi @lopespetro , Thank you for the response.

As I know, we can only use functions in Custom attributes, please correct me if I’m wrong.

And this is an email action type, will go for Execute Online SQL action type if I couldn’t find a solution.

Thank you for the suggestion.

Userlevel 5
Badge +12

Hi @lopespetro , Thank you for the response.

As I know, we can only use functions in Custom attributes, please correct me if I’m wrong.

And this is an email action type, will go for Execute Online SQL action type if I couldn’t find a solution.

Thank you for the suggestion.

Hi @MitDenukN , the select is just to have an idea and test.

In attribute I always do like this and it works.

Try:

&AO.fnd_user_property_api.Get_Value('userid', 'SMTP_MAIL_ADDRESS')

 

in user_id, you can use a field in the table or use a get function to fetch the user from another table.

Hope it helps.

Br.

Lopes

Badge +14

Hi @Darshana Herath and @lopespetro, I tried both of your suggestions. But still this is not working.

This is strange. I tried execute online statement action type as well. The action fetch values for the attributes but not working if I try to fetch value from a select query or a get method.

Badge +14

Hi All, Could this be a permission issue?

 

Userlevel 5
Badge +12

Hi All, Could this be a permission issue?

 

Hi @MitDenukN , does this payment screen has a journal tab where you view the change status history?

Could you send a print of the screen please?

Badge +14

Hi All, apologies for late response.

I had to create a new event action with the type of execute online SQL to make it work.

Thank you all for your valuable suggestions.

 

Reply