web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Business Portal Project Timesheet shows incorrect user when using 'Sign in as a Different User' option

(0) ShareShare
ReportReport
Posted on by 65

A client has one person enter all timesheets for a group. When they use the 'Sign in as a Different User' option to enter new credentials, the user shown in the header changes, but the timesheet user does not. The timesheet header is pulling from the "window.dialogArguments" to populate the employee ID and name. Everything works fine on the initial load - so currently they are closing down their browser and re-opening between each user. I'm thinking maybe the way the modal login window is invoked from the initial load of BP vs. the 'Sign in as a Different User' link differs in a way that the window.dialogArguments does not get reset. Anyway, I'm trying to figure out how to either get the correct value in the window.dialogArguments array OR how to read the user name from the Sharepoint header (since that does update correctly) and use that to get the valid employee id in the TimesheetHeader.aspx & TimesheetEntry.aspx code. Thanks in advance for any help!

*This post is locked for comments

I have the same question (0)
  • Rob Bernhardt Profile Picture
    on at

    Courtney,

    How many people is this one user entering timesheets for?  

    You could also create a shortcut per user (on the desktop or somewhere else) that launches IE with the BP url as a particular user.  This would eliminate your need to modify any code and also save the user some keystrokes.

    Thanks

    Rob

  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at

    Hi Courtney,

    If you're using the BP Timesheet entry module, then I assume that you also installed the PDK application to process those TimeSheets ? so why not give access to that person to act as a Proxy for entering the Timesheets directly in PDK with a single user login, rather then breaking your head with Windows Authentication issues on the browser side ?

    PDK is part of the Dynamics GP installation DVD... it can also be used for the Employee Expense reports...

  • Courtney Ryan Ortiz Profile Picture
    65 on at

    Hi guys,

    Thank you so much for the responses and the suggestions. Since the login credentials aren't passed in the url, I think this would look like what they are doing now. They are offsite and don't get on the network for anything but entering these timesheets, which is why it makes more sense for them to use the BP interface via the web than pdk. They are able to make it work, but this looks like a bug and they are hoping for a fix to remove a few extra steps each pay period. Thanks again,

    Courtney

  • Verified answer
    Courtney Ryan Ortiz Profile Picture
    65 on at

    I figured out a solution that works for me and I thought I'd share it in case anyone else has the same issue. The signout.aspx code did clear the cache, so I chose to add onto that code module. I modified it to read:

    function _spBodyOnLoad()

    {

    try

    {

    document.execCommand("ClearAuthenticationCache", "false");

    if (confirm('You are now logged out. Login as a different user? (Click OK to login or cancel to exit the browser.)')) {

    url="xxx.com/.../Project%20Timesheet%20Entry.aspx";

    window.location=url;

    } else {

       window.close();

    }

    }

    catch (e) {}

    }

    The url for the calling page is stored in the 'back to site' link. It would be better form to use document.getElementByID to reference that. I believe the element starts with 'C100' - but you can view the page source to see exactly. There were other solutions I tried, one from a microsoft site for sharepoint support that recommended modifying the Init,js file - but for some reason that resulted in the login pop-up being called 3 times on the initial load and not clearing the cache on the Sign in as a Different User option. It may have to do with the way BP invokes the SP code.

    I hope this helps someone down the road.

    Courtney

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans