approval management

Hello,

When I try to send approval request I get error that user xxx is not in the User Setup table.

Then I checked the code (codeunit 439) and found this.

UserSetup.SETRANGE(“User ID”,UserSetup.“Approver ID”);

IF NOT UserSetup.FIND(’-’) THEN

ERROR(Text005,USERID);

Is it possible to write like this?

And what should I do to get rid of the error?

Any ideas appreciated,

Amaraa

the easy way out is to create the user if you can in the setup list.

And are you asking can we write codes like this? these are codes written by Microsoft Developers! so we can, i guess!

The thing is I already got the users in the user setup table. and still the approval management giving me the error.

then check for the spelling! sometimes you might get the error since the word spelt might be different in the setup table compared to the ones we spell in the curr.table.

Hi Amaraa,

Check the User Setup table (Administration → Application Setup → Users → User Setup)

You can have a user who is setup to login but not on this table.

The strange thing is that I have configured my logins in this table. and it is not misspelled. :frowning:

Hi Amaraa,

Turn on the debugger and see what value is in UserSetup.“Approver ID” at the time as this is called in a loop.

Yes, I did like that and it has value for the usersetup.“Approver ID” and I can see the that the “Approver ID” is in the User Setup in User ID.

it is kind of strange isn’t it?

Hi Amaraa,

Did you check the Table Filter for User Setup in the debugger - you may need to add UserSetup.RESET;

yes, that’s what I’m thinking. but again having a confusion that it is standard code. so why it works for the other and giving me this error now.

Hi Amaraa,

I wonder if this is your problem

http://dynamicsuser.net/forums/p/7278/40138.aspx#40138

I guess it is not the exact case. In my case system takes the user and then the approval management should find the approver in User Setup table. Approver ID in User Setup table is code then and User ID is code also. But still system cannot filter with UserSetup.setrange(“User ID”, UserSetup.“Approver ID”).