Getting error QB -sdk NAME must be unique - intuit-partner-platform

I am using the IPPDotNetDevKit.2.1.12.0 SDK to first get a list of all customers. I then add new customers which works 99.9 percent of the time, but for some (and thereafter persistant for that perticular entity) I am getting this error;
QB -sdk NAME must be unique in QB! name = ABC Company
I don't see the customer in QuickBooks (so sync error), and I look at the set of customers returned in the 1st request (where I set qb_query.ActiveOnly = false)
<xml version="1.0" encoding="utf-8"?>
<CustomerQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.intuit.com/sb/cdm/v2">
<StartPage>1</StartPage>
<ChunkSize>500</ChunkSize>
</CustomerQuery>
and the customer in question "ABC Company" is clearly not there (only have 43 customers returned so ChukSize is not the issue). So it seems I tired to add that customer, it got "stuck", and now everytime I try to add it again, I get "name must be unique". However checking sync errors;
<?xml version="1.0" encoding="utf-8"?>
<CustomerQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ErroredObjectsOnly="true" xmlns="http://www.intuit.com/sb/cdm/v2">
<StartPage>1</StartPage>
<ChunkSize>100</ChunkSize>
</CustomerQuery>
I get no rows returned. (it does look a little funny where the SDK puts ErroredObjectsOnly but what do I know).
So my question is, how can I get either the customer query or the sync error query to return the "lost" customer so I can find the ID and delete it or fix it?
Thank you.

Names have to be unique across all Customers, Vendors, Employees, and "Other Name" elements.
Did you also check to make sure that there's no Vendor, Employee, or "Other Name" with that same name?

Related

List All domains and data sources use in the domains in Jaspersoft

How can i List All domains and data sources use in the domains in Jaspersoft.
i mean i have different domains like audit domains,customer domain etc is there any way to get all domains with tables(Data sources) use in these domains in jaspersoft?
I have around 20 domains and manually going to each domain and listing tables is cubersome so i need some help!
there is not a good way that i have found (i am sure you can dig into the DB)
one way to get this is to export the domains and it exports to a nice neat XML file.
As we only use JDBC sources we only need to look for "jdbcTable" and "jdbcQuery" tags to see what a domain is using this is all in the second 1/2 of the xml. if you use other datasources you may nee to review the xml to see how Jasper references them in the XML.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0">
<resources>
<jdbcTable id="" datasourceId="" tableName="">
<jdbcQuery id="" datasourceId="">
<query> select * from table <\query>
Below solution is for identifying Adhoc Views that depend on Domains, but I believe you could implement a similar solution with domains that depend on Datasources.
In the domain I created a derived table [AdhocViewName].
The query for this domain is:
SELECT a.id as AdhocID,
r.label as AdhocLabel,
a.reportDataSource as AdhocDataSourceID,
t.AdhocDataSourceLabel
FROM (SELECT id as AdhocDataSourceID,
label as AdhocDataSourceLabel
FROM public.jiresource
) as t
INNER JOIN public.jiadhocdataview a ON a.reportDataSource = t.AdhocDataSourceID
INNER JOIN public.jiresource r ON a.id = r.id
Notes:
even though the tables appear with underscore (public_jiresource, the query only worked by substituting "." (public.jiresource).
for some reason jasper doesn't like it when you use brackets; eg, a.id [AdhocID], thus I used a.id as AdhocID.
When you pull the derived table into an Adhoc View,
create a table
filter with resourcetype is one of SemanticLayerDataSource, AdhocDataView
Colums: Resource Label, uri
Groups: adhocdatasourcelabel

Querying Jobs for a Customer

I'm trying to query Jobs for a specific Customer, but am running into a little issue. It appears that the ParentRef is not queryable:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2014-02-19T10:20:31.635-08:00">
<Fault type="ValidationFault">
<Error code="4001">
<Message>Invalid query</Message>
<Detail>QueryValidationError: property 'ParentRef' is not queryable</Detail>
</Error>
</Fault>
</IntuitResponse>
However, that's the only thing I can think of to limit the query on the server-side. In the old world, we submitted a Filter of CustomerId :EQUALS: #{id} to the Jobs API, but now the Customer/Job APIs have been combined. My v3 query is SELECT * FROM Customer WHERE Job = true AND ParentRef = '#{id}' which seems like a reasonable thing to do.
Am I missing something? Could you allow us to query on ParentRef?
Something like this works OK:
SELECT * FROM Customer WHERE FullyQualifiedName LIKE 'Your Customer Name:%'
the above works if you only have one level. Try a cast:
if (null != cust.ParentRef && ((ReferenceType)cust.ParentRef).Value == c.Id)
Then if you were building a treeview for instance just wrap it in a recursive method.

Getting multiple invoices from intuit anywhere api at once

When I update an invoice in QB (after its been changed in my system), I want to avoid updating anything that the user has modified in QB. My plan was to use the filter API method and filter by Ids to get the list of invoices from QB that my app created. However, it doesn't look like InvoiceFilter accepts ListIdSet. It does have a TransactionIdSet, but I can't find a way to get ahold of that number (i.e., the TransactionId) via Data Services. It's certainly not in the response when invoices are read. So, how do I query for a specific set of invoices via the API?
The transaction id refers to the id of the invoice here.
For eg, the following invoice query will retrieve the invoice with Id 4 -
<InvoiceQuery xmlns="http://www.intuit.com/sb/cdm/v2">
<TransactionIdSet>
<Id idDomain="QB">4</Id>
</TransactionIdSet>
</InvoiceQuery>

Accessing metadata in Fetch-based reports

In reports I need to show localised field labels and entity names. For this I need to retrieve some pieces of metadata, namely -- localised entity names.
Can you access metadata in Fetch-based reports? If you can, how severely will performance suffer?
There is a hack to sort of get pick list values and default labels. Quoting from reference:
You must use the distinct clause, and create a seperate dataset to
fetch only the option set field like this.
<fetch version="1.0" output-format="xml-platform" mapping="logical"
distinct="true"> <entity name="account">
<attribute name="accountratingcode" /> </entity> </fetch>
This actually returns 2 columns to BIDS -
accountratingcode
accountratingcodevalue
Create a report parameter for the main report and in the Available
Values tab specify:
Get Values from a query
Dataset: Seperate Dataset with the Fetch XML
above
Value Field: accountratingcodeValue
Label Field:
accountratingcode
Sorry to say that entity metadata is not exposed via the FetchXml interface as neither "attributes" nor their corresponding "labels" are entities, so cannot be queried.
You can prove this by using the FetchXml builder ([details of getting it and making it work with CRM 2011 are here][1]). You will note that none of the available entities contain the information you seek.
Edit: looking at the core requirement (rather than answering the question in isolation as I originally did), it is possible to include "label" values in FetchXml statements, as #skfd notes in his own answer.

How to retrieve user information from facebook using fqlquery?

I have the fql query as shown below.
Select uid,profile_url,pic_square from user where name="Ershad"
here i am getting a response as below.
xml version="1.0" encoding="UTF-8"
fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" list="true"
But i want all the list.All the details uid,profile_url and pic_square.
Please anyone help me out..
When you get a return result like that, it means that there was no data returned that matched your query. I can immediately think of two things that would cause this:
There is no user named "Ershad" that has your application installed. Note that the name field is a full name search, so you'll need to put the person's entire name in there.
You are querying with the wrong application API Key
I would suggest you try your query in the API Test Console. Select your application, then choose "fql.query" from the Method drop-down, and try your query there.