Who's Online Now
0 registered members (), 0 guests, and 17 spiders.
Key: Admin, Global Mod, Mod
Newest Members
dpf6jbez9, hcmconfig, Christine, BBH, vjnanda
1290 Registered Users
Recent Posts
IR35 Legislation
by delboy. 03/09/19 09:37 AM
Top Posters(30 Days)
CT 4
delboy 2
Popular Topics(Views)
484,790 PAYE RTI
58,246 HR_PF.K RUP4
Previous Thread
Next Thread
Print Thread
Rate This Thread
Page 2 of 2 1 2
#12200 - 15/02/19 03:19 PM Re: Update employee spinal point via API [Re: Andrew]  
Joined: Feb 2019
Posts: 6
Andrew Offline
lurker
Andrew  Offline
lurker

Joined: Feb 2019
Posts: 6
lThanks Clive, that was very good!

Still having problems, unfortunately. I'm calling three APIs to make the changes. The first two appear to work OK, but the third fails with 'Grade step is invalid. Either grade step does not exist or the eff dates for the assignment are outside those for the grade step'. Sounds straightforward, but I can't find anything that looks wrong - am I missing something?

I hate to inflict reams of code on people, but here are the calls I make (in the correct order but with the surrounding code edited out). I'm only half-familiar with this stuff so am not particularly confident that what I'm doing is sensible.

- I wasn't able to post the code in this window so have attached as PDF.

Thanks for looking!
Andrew

Attached Files
Thanks Clive.pdf (43 downloads)
Last edited by Andrew; 15/02/19 03:22 PM.
#12202 - 19/02/19 05:13 PM Re: Update employee spinal point via API [Re: Andrew]  
Joined: Feb 2019
Posts: 6
Andrew Offline
lurker
Andrew  Offline
lurker

Joined: Feb 2019
Posts: 6
...UPDATE....

Have discovered that I'm using the wrong step id. Will investigate and update ......

Andrew

#12206 - 01/03/19 11:20 AM Re: Update employee spinal point via API [Re: Andrew]  
Joined: Mar 2005
Posts: 2,107
CT Offline
CT  Offline

****

Joined: Mar 2005
Posts: 2,107
Andrew, sorry I didn't get an alert that this thread had been updated so I've only just seen it. If in the meantime you've fixed it, then good on you, if not then post an update here and hopefully you won't wait a couple of weeks for me to respond laugh


CT
#12207 - 01/03/19 02:40 PM Re: Update employee spinal point via API [Re: Andrew]  
Joined: Mar 2005
Posts: 2,107
CT Offline
CT  Offline

****

Joined: Mar 2005
Posts: 2,107
Andrew, something just occurred to me regarding the validation mode.

If you are running your api calls with the p_validation_mode parameter set to TRUE in each case, it may be that the act of rolling back the previous transaction(s) will cause the last one to fail.

It's better, I think, to create a save point prior to your first API call, then set all your p_validation_mode parameters to false - meaning they aren't rolled back (but then neither are they committed).

Then, after the last API call has completed, establish whether you were doing validate-only, and do a ROLLBACK TO <savepoint name> if so.

I'd probably go further and have that entire 3-api sequence in a single procedure with appropriate error handling as well as the savepoint stuff (in case either the second or third APIs failed for some weird reason) that way, you are able to treat the succession of API calls as a pseudo-API in itself - if you see what I mean! No? OK then! smile


CT
Page 2 of 2 1 2

Moderated by  Administrator, bcooper, CT 

Forum Statistics
Forums60
Topics2,224
Posts12,007
Members1,291
Most Online90
Mar 5th, 2017
Today's Birthdays
No Birthdays
Recent vacancies
Top Posters(All Time)
CT 2,107
delboy 1,299
bcooper 1,291
paulgos 436
SBi 426
pat 254
Gus 252
vkumar 223
September
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 2.252s Queries: 17 (0.460s) Memory: 2.7646 MB (Peak: 2.9217 MB) Zlib disabled. Server Time: 2019-09-17 23:28:38 UTC