Delete amended_from from employee table at Erpnext - erpnext

If I delete amended_from field from employee table then any problem for ERP?
amended_from is creating problem during new employe create.
Thanks,
Arif

If I delete amended_from field from employee table then any problem
for ERP?
Was the DocType Employee submittable for you by default ? Check if in Employee's DocType record, Is Submittable is checked or not. Because as far as I know this field is available only for submittable documents.

Related

How do I add data from parents to child table Postgres?

I have 3 tables:
What I have: 2 pages;
ONE where an admin can add a project's name and the id will be autogenerated and
TWO (currently working on) Add and user with its name, ID to the USERS table, and select a project from the PROJECTS table, so after it gets added, display that info, either the users and the projects they belong to, or the projects and the users it contains.
In this page I am already displaying the projects from the PROJECTS table in a checkbox, since they can belong to several projects, but I need to display: userName, projectName and probably later the IDs, in a table when they get added.
How can I add that info to the child table and show the columns values from its parents tables? projectName and userName
Any help and suggestions are highly appreciated.
PS: I'm not good with databases so I'm probably missing something obvious here.
Better to use userId from "users" table as FK in "projects" table.

MS Access Filter Child Table by Record Chose on Form

I'm trying to create a simple 2 table database - table 1 holds ClientInfo and table 2 has ClientVisits - Relationship is on ClientInfo.ID->ClientVisits.ClientID. Then I have a form created thus for viewing the ClientInfo plus a child(sub?)table which SHOULD show all the records from ClientVisits where my Form ClientID = ClientVisits.ClientID.
Here is my form
Here is the child table with fields shown
Relationships
So I already have one record in ClientVisits for the currently chosen ClientID form record. But it doesn't show in my Table.ClientVisits. Other than the relationship I don't have any other link between the ClientID and the ClientVisits.ClientID field.
If I need to post further info please let me know, trying to describe this as well as I can - sorry if it's not making sense. Thanks.
You have to link both tables in your form.
In my example, main data of my form is a table called CLIENTES, where it shows all the information about a cliente. It would be exactly the same as your table ClientDetails. In this table, primary key is a field called DNI (it would be the equivalent of your ID field)
I got a second table called CONSULTAS MÉDICAS. This table is just a list of how many times this client comes to see us. It would be the same as your secondary table CLIENT VISITS. In this table, I got a field called PACIENTE, linked to my table CLIENTES. Let me show you.
Ok, now my form is done based on the data of my table CLIENTES, but I got a subform control, where I have linked the table CONSULTAS MÉDICAS
To make this work is pretty easy. Not filters or queries. Just linked child and master fields. To do this, you have to select properties of your subform control, and then go to DATA TAB
Just choose as main field your ID field from table CLIENT DETAILS and link it to child field CLIENT ID from table CLIENT VISITS
That should work for you.

Can't add or edit records in form after updating relationship MS Access

Previously I had a Payment table's Form and a Current Tenant's Table's form. The Payment table was related with the Current Tenant's email address.
Later I realized the Payment table needed to include details of old tenants. So i created an append query to create a table containing details of all the tenants. And I changed the relationship so that the payment table is related to the email address from all tenant's table. Now using the Form, if i try to add a record using the form, it shows "You can't go to the specified record" and if i try to edit the records, it displays "The record set is not updateable". But i can add and edit record using the table. This problem only exists when i try to include the "Name of Tenant", "Tenant's Contact Information" or any other field from the "All Tenant's Table" in the form. How can i fix this?
Note: The email address in All tenant's contains duplicate records due to different Check out and Check in date. Except those, all other records are same.
When you join multiple tables in Access in order to allow updates across both tables, you need to join using a Primary Key.
Here is a great reference on the subject of Primary Keys.
Be sure that your "Current Tenants" table uses email address as a primary key, and then join it to the "Payment Table". The Payment table should also have a primary key (likely an 'auto number' field).
Ok, i found a way to solve the problem... I edited the relationship so that the All tenant's table is joined with Current tenant's table by Type 3 relationship. And Then joined the All tenant's table with the Payment table... It then solved the problem...

Duplicating MS Access main form record while keeping the parent-child link in the subform

I have a Monthly Reports entry form (data source: MonthlyReports table) with a Project Info subform (data source: Projects table) linked on ProjectID field. ProjectID is a PK in the Projects table and a FK in the MonthlyReports table.
I am trying to use the Duplicate Record button to duplicate the record in the main Monthly Reports form, edit the duplicated record and save it as a new record/monthly report for the same project. I would like to keep the Project Info (or ProjectID link) in the new record after duplicating. When I duplicate the record, it creates a new Monthly Report record with a unique number, but it does not keep the ProjectID foreign key, thus creating an unrelated record without the ProjectID foreign key. How can I modify the macro or add a VB code on click of the Duplicate Record button to keep the Parent-Child field link?
Thank you.
Short answer, If I understand what you're asking, is no.
When you have a relationship between a master and child table, it is a one (Master record) to many (child records) relationship. A child cannot have more than one parent. Even if you haven't defined this relationship in the database, when you link a subform to a master form by a field, that one-to-many is (properly) assumed.
What you would need to do is have the macro, subsequent to creating a new master record, create a new child record then copy the fields of the existing child record to the new record. Finally, you will need to set the value of the new child record field [ProjectID] to be the value of the newly created master record. Now you have the complete duplicate.

Navigation Properties get overwritten when I update my Entity framework from database

I have a table called Matches and a table called Teams in my database where my Matches table has two foreign key HomeTeamID and AwayTeamID link to Teams table.
When I generate edmx file I got Team and Team1 in my Navigation Properties in my Matches class. I overwrote them to HomeTeam and AwayTeam in the design panel, and everything works fine.
But next time when I update my model from database, their names changed back to Team and Team1.
How can I solve this?
Thank you in advance =)
Add real foreign keys to your DB.