Autopopulate a field in a form based on what user is logged in - database

I've created an access database using access 2007 for one of the teams I work with and I'm fairly new to access so would like some help. The database is being used to log jobs for engineers so I have a login system where a user selects their name from a drop down and enters their password, and depending on their access levels they get directed to their own user menus etc. Now what I would like is once the user has logged in they will click on the job sheet button will then direct them to a list of jobs raised from here they click on new and then a pop of the Job Sheet where they can enter details from the call pops up what i want is in this job sheet for their name to auto-populate in the field labelled user, how do I get the user who has logged in their name to just auto populate in the field once they have accessed it.

You might want to check out the "OnLoad" property of the form. Go to the properties section of the job sheet and click on its "on load" event. Select VBA code. Type the following:-
me.fieldname = [Forms]![FirstFormWhereLoginDropdownPresent].DropDownName.Value
Hope this helps

Related

I made a MERN stack but I have a problem with making roles for users. Any solutions?

So I thought that I want to make roles for users, e.g Role1 can choose from AutoSearch field an employee and click the button with the possibility of writing a comment. Role2 can click the Comment button and click the 'Mechanic Tools' button. Role3 can click every button + a link from PrivateRoute which is 'Register'(adding a new employee to the database). For Role1 as you can realize it's impossible to click the Mechanic Tools button but its role can see the result of it. Additionally, the whole app has to keep the state of clicked buttons(buttons are like ON/OFF). I assume that I have to make those buttons sending state to MongoDB but I have no clue how to start with that roles thing.
I was trying to make that in MongoDB obviously but I didn't mean the database accessibility but the possibility of clicking each element in-app.
I mean these yellow buttons + the text field under the tire. Sorry that I dont write code but I have it in 3 different files and you might not understand what I mean.
https://gyazo.com/f604257b88efb04c64d04d73113e0125
I expect the possibility of logging in(I can do it now) as a user with a role assigned to its account with permissions.

I need to show the user specific data to the particular user after log in by that user it should show the its own information

I have created login page of groceryList after login by particular user I need to display its own added grocery Item instead of added by other user I have used Angular js for front end ,Nodejs for handling the mongoose connection with mongodb .
Mongodb is having one collection with two document 1>users 2>groceries.
1>users :contains user information means username,password.
2>groceries:Contains groceries added by user
now my question is I need to show the added grocery by user1 it should not visible to user2 if he has not added . on which way I can implement this
data should be user specific please help me on this .
Thanks in Advance!!

Concurrent update on record in Salesforce

In system I am developing, user can access particular page which is used to make DML operation on custom object. I want to fulfill following business case :
User A opens a Page made changes on page but did not click Save.
At the same time User B opens a page made changes and click Save. User B data got saved in record.
Now user A came and click Save. But as data is outdated I want to prompt user that "you are over righting the latest update. Do you want to continue."
Is there any faster out-of-box way available to achieve it ?
Assuming this is in a VisualForce page, you could check if the value has changed inside your Save method.
Query for the LastModifiedDate of all records you may change, and save that in your controller. This should be done in your controller's constructor and/or anywhere you re-load the record(s).
In the save method, first query the record(s) again to check if the LastModifiedDate has been changed. If it has been changed, prompt the user.
Assuming you are trying to insert a record into an object.
You can write a validation rule on that object. Check if that record is already inserted or not and show an error message.
Regards,
Naveen
autorabit

Can Customer portal user create records in salesforce?

I want to create record for one sobject which is child object of standard sobject account through customer portal. But when I click on "create new" the standard edit page is shown on customer portal, but after entering different field values when I click to save it just give me one message below:
Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
What should I do to create record from customer portal?
You must to adjust Custom Object Permissions. If you have an administrator profile do this:
Go to "Setup" -> "Manage Users" -> "Profiles"
Select profile you want to edit
At the next page click "Edit" button and scroll down to "Custom Object Permissions"
In order to create a new object record you must have "Read" and "Create" access
If that is not the case - select that checkboxes and click on the "Save" button

Website "you can do this" script

I want to create a training path for new users accessing my site. This training path must display info bubbles showing what you can do on every page, but only the first time you access it.
So, for example, if a user enters a page where there's an edit button an info box should appear next to the edit button telling the user that he can edit that page.
I will create the script myself, I just want to know what's the best method to check if the user has already seen that box or not. I was thinking about storing in database a boolean value for each info box which will be set to true if the user has seen the box. To save some queries from the DB I think I can also store the same values in localStorage or in Cookies.
What is the best practice for creating user training paths for a website?
The way I suggest is to store user id (ip or username ? ) and a bit value for each bubble like you say.
PS: for your script you can use this:
http://www.maxvergelli.com/jquery-bubble-popup/documentation/
Jérôme

Resources