Skip to main content
Question

Assign Deferred_Call to a variable

  • January 19, 2022
  • 5 replies
  • 355 views

Forum|alt.badge.img+9

I want to call a function from a Deferred_Call in a custom event. No issue with that I hear you say but the function returns a number variable. I want to then store that variable in the custom event and display it back to the user.

So I want to do something like below where My_API.getcount is passed in a value in “attr” and then does a count with that value and returns what it finds

Transaction_SYS.Deferred_Call(job_id_,
                                'My_API.getcount',
                                'PARAMETER',
                                attr_,
                                'Return count');

I want to then assign what it returns to a variable (let’s call it “numvar” )and display that to the user in a warning message box like below.

Client_SYS.Add_Info('PurchaseRequisition', 'WARNREQ: Warning:the number is ' || numvar);

I don’t think this is possible?

5 replies

Marc
Sidekick (Employee)
Forum|alt.badge.img+7
  • Sidekick (Employee)
  • 33 replies
  • January 20, 2022

@jdoherty , could you please indicate for which product is your question applies to (e.g. Apps10 or IFS Cloud)?


Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • 97 replies
  • January 20, 2022
Marc wrote:

@jdoherty , could you please indicate for which product is your question applies to (e.g. Apps10 or IFS Cloud)?

APPS10


Marc
Sidekick (Employee)
Forum|alt.badge.img+7
  • Sidekick (Employee)
  • 33 replies
  • January 20, 2022

I thought you would say that. In that case I can't be of any help. If it would have been IFS Cloud I would have advised you to use a BPA Workflow for that.
Hope that someone else will be able to help you.


Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • 97 replies
  • January 23, 2022

I have to say I think it is absolutely ridiculous that this is not possible and a big black mark against IFS.

It should be quite easy to return a value from server to client from a background job. Because you can’t, it makes it very difficult to implement user feedback in custom events.


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 880 replies
  • January 24, 2022

Hi @jdoherty 

 

Deferred job is for background processing and may be not the best suit for your requirement since you need to display a warning to the user.

Is there any specific reason for for choosing Deferred job instead of calling the function directly from the event action?

 

Regards,

Damith


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings