What is "entityRef" element in qbXML with TimeActivity - qbxml

I am creating some time tracking software to interface with quickbooks, and below is my exported XML file. I receive status code 3140, saying there is an invalid reference to QuickBooks entity in the TimeTracking. Quickbooks returns error : "The secified record does not exist in the list."
I have observed that if I pull out the EntityRef tag from the XML file, Quickbooks throws a parsing error, but I am at a total loss as to what needs to be inserted within the EntityRef element.
<?xml version="1.0" encoding="UTF-8"?>
<?qbxml version="10.0"?>
-<QBXML>
-<QBXMLMsgsRq onError="stopOnError">
-<TimeTrackingAddRq>
-<TimeTrackingAdd>
-<EntityRef>
<FullName>Some List Name Here?</FullName>
</EntityRef>
<Duration>PT8h5M</Duration>
</TimeTrackingAdd>
</TimeTrackingAddRq>
</QBXMLMsgsRq>
</QBXML>

EntityRef/FullName can be either:
an employee FullName
a vendor FullName
or an "Other Name" list FullName
i.e. it's the person/company that you're tracking time for.
In other requests, it can also be a customer FullName. But in the case of Time Tracking, it doesn't make sense to track time for a customer.
Quoting from the QuickBooks OSR documentation:
Entity
A QuickBooks "entity" is a customer, vendor, employee, or
person on the QuickBooks "other names" list. Special cases to note:
In a BillToPayQuery message, EntityRef refers to the vendor name. In
JournalCreditLine and JournalDebitLine messages for A/R accounts,
EntityRef must refer to a customer, or else the transaction will not
be recorded. For A/P accounts the EntityRef must refer to a vendor, or
else the transaction will not be recorded. In a TimeTracking message,
EntityRef cannot refer to a customer, only to an employee, vendor, or
person on the "other names" list whose time is being tracked.

Related

Database optimization for subscriptions and activation codes

I wonder about the structure of the database and how it should be designed optimally.
Problem:
An application for publishing books, books is added by the administrator. There is a Cooperator module, when publishing a book to the platform, you can add a Cooperator. Cooperator has activation codes. The activation code allows the user to access content that has been tagged with a given Cooperator. You can purchase a subscription, a subscription gives you the opportunity to access books without the specified Cooperator. I do not know how to solve it correctly from the database side, to make it as optimal as possible, in addition, if the user does not activate the Cooperator code, he should not see these books at all.
Actual Database:
Book Entity:
Date Created
Date Updated
Id
Name
Categories
Cooperator
Cooperator Entity
Date Created
Date Updated
Id
Name
CodeBatches (One to Many)
Code Batche Entity:
Date Created
Date Updated
Id
Name
Access In Months
Cooperator (Many to One)
CodesActivation (One to Many)
Code Activation Entity
Date Created
Date Updated
Id
Status
Activation Code(Unique)

Microsoft Master Data Services 2016 Additonal Domain Atrribute Referencing

Is it possible to reference additional columns apart from the 'Code' and 'Name' columns when using a domain attribute in an entity?
E.g. A person entity has a code of '1' and a name of 'Smith' and a Gender of 'Male'
In a customer entity there is a domain value referencing the person entity which displays the following 1 {Smith}. The users would like an additional read only attribute which would copy the Gender value of 'Male' into the customer entity based on the domain value. Can this be done using out of the box MDS UI?
I know this is duplicate data and breaks normal form but for usability this would be useful. It would be the equivalent of referencing additional columns in an MS Access drop down list.
Many thanks in advance for any help
This is not possible with the standard UI. One option would be to develop a custom UI where you can handle these kind of requests.
If you want to stick with the standard product I can see a workaround but this is a bit of a "dirty" one.
You can misuse (abuse) the Name attribute of the Person entity by adding a business rule to the Person entity that generates the content of the Name attribute as a concatenation of multiple attributes. You of course need an additional attribute that serves as a place holder for the original Name. The concatenated field will then show in your customer entity.
One question that does come to mind is why a user would like/need to see the gender of a person in a customer list? As you have a separate Person entity I expect you to have multiple persons per customers. What would the gender of one person - even if it is the main contact - matter?

CloudKit predicate: Search multiple reference fields with predicate of CKQuery

Using Apple CloudKit, I have a record user and a join table record to connect users and to save the state of the relationship. This means that users can request to be friends and the other party has to accept first.
Now I want to query for those relationship records the user was a part of. This means in the CKReference field Sender and the createdBy field (also CKReference).
How do I build a valid predicate for CKQuery to find records where either the sender or the createdBy is equal to the current user?
Apparently CKQuery doesn't support OR and CONTAINS works only on Strings...
As #Thunk pointed out. Not possible as of today

What's the relationship between res.partner and res.user?

I am new to odoo v8 and i am not able to understand the relationship between res_partner and res_users tables and also with hr_employee table are they all related?
The relationship between res.partner and res.user is that res.user inherits from res.partner using an inheritance type called "Delegation Inheritance" (see documentation).
Because of "Delegation Inheritance" every res.user record has a mandatory internal connection to a corresponding res.partner record using a field partner_id. What is this connection all about is to directly use all the fields of res.partner to store data shared by res.user and res.partner (i.e. name, phone, etc... if for example you refer to phone property of a record of res.user you'll get the value stored in the corresponding res.partner record) so res.user has to define fewer number of fields on it's own, like password, login, etc..
Note also that because of this relation res.user can NOT exist in the system without corresponding res.partner, it's why every res.user has one, but nonetheless res.partner can exist without res.user.
hr.employee have m21 with res.users (user_id)
res.users have m21 with res.partner(partner_id)
Actually only res.users has a "real" relationship to res.partner, because with every user odoo will create a partner (per default no customer and no supplier). this partner will be used e.g. for emails and the followers system in odoo.
But you can have partners without users, too. That will be a normal partner, for defining customers and suppliers.
And finally there is the employee. You can set a user on it. If i recall right, the user will be used for attendances and timesheets.

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...