Question

Assign Deferred_Call to a variable

  • 19 January 2022
  • 5 replies
  • 247 views

Userlevel 4
Badge +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

Userlevel 3
Badge +7

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

Userlevel 4
Badge +9

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

APPS10

Userlevel 3
Badge +7

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.

Userlevel 4
Badge +9

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.

Userlevel 7
Badge +20

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