Question

Make events work on both apps 9 and 10 when tables are different

  • 9 June 2020
  • 3 replies
  • 118 views

Userlevel 6
Badge +14

Hi all,

We have an event on shopord.work_instruc_printed (apps9).

 

When testing on apps10, we realize that the field, work_instruc_printed, does not exists.

We obviously have to rewrite the event, but can we somehow have it work on both 9 and 10?


3 replies

Userlevel 7
Badge +20

Hi @Hans Andersen 

 

Seems in Apps 10, work_instruc_printed field is replaced by WORK_INSTRUCT_PRINT_COUNT. Have you tried with that?

 

/Damith

 

 

Userlevel 6
Badge +14

Hi @dsj ,

Yes, I have it running on 10 also.

 

The problem is the upgrade. Then both the Event and the Action has to be replaced. It is going to be a part of the upgrade process. I was just wondering if it is possible to do something clever, where the same event can run on both 9 and 10. Something like

if apps9
  WORK_INSTRUC_PRINTED  
else
  WORK_INSTRUCT_PRINT_COUNT

or 

if apps9
  use event=x 
else
  use event=y

Userlevel 7
Badge +20

I’m not sure what’s the best way to handle this during the upgrade. We had the similar issue in HR module during an upgrade and had to spend so much time to troubleshoot and correct events Apps10.

 

One option to check the IFS version is by the component version.

Eg:

IF module_api.get_version(‘SHPROD’) = ‘13.0.0’ --Apps10

   WORK_INSTRUCT_PRINT_COUNT

IF module_api.get_version(‘SHPROD’) = ‘12.1.0’ --Apps9

    WORK_INSTRUC_PRINTED 

 

If you come with a nice idea where to use this, please share :)

Reply