Author Topic: Edit Customer with PerentRef not working.  (Read 5161 times)

rpaulh

  • Member
  • *
  • Posts: 22
Edit Customer with PerentRef not working.
« on: July 20, 2011, 12:50:21 PM »
We have quite a few Customers in both QB and FM, but they were entered manually and not created by FMBooks push/pull. Since the data I want to use is in FM I need to push some edits to QB which inclued Job info. When I add the step to SetVariable to the ParentRef::FullName field, the script errors out with this error:
Code: 3170
Severity: Error
Message: There was an error when modifying a Customers list, element "MyCustomerNumber"
QuickBooks Error Message: Unknown Error

Can I not push to this field, or do I need to do it in a different way. My data for the ParentRef::FullName field is "JT Packard:Charter". The other Customers we have that are correct in QB have that Customer field, which I thought is the field I need to change? Anybody who can make sense of that and help, I really appreciate it. Also, if I pull out that one new script step my Edit Customer script runs fine.

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: Edit Customer with PerentRef not working.
« Reply #1 on: July 28, 2011, 07:34:46 AM »
What does "MyCustomerNumber" have to do with the ParentRef::FullName field? I suspect "MyCustomerNumber" is a custom field, and if so, you cannot modify in a CustomerMod request. Can you do a Customer Query request that includes "<OwnerID>0</OwnerID> and then use this:

PCQB_SGetXML( "Response" ; "" )

...to retrieve the XML? It will clear up the question of whether or not it's a custom field.

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852

rpaulh

  • Member
  • *
  • Posts: 22
Re: Edit Customer with PerentRef not working.
« Reply #2 on: July 28, 2011, 09:03:41 AM »
The "MyCustomerNumber" was just me trying to avoid typing out the long QB customer number that was part of the error message. I know I could have done a copy/paste, oh well. What I am trying to do is update a record that I did not originally push to QB, and specifically push Job info into the Customer field (That field should read "JT Packard:Charter" when I'm done). I think this is the "ParentRef::FullName" field, but am not sure so my questions are:
What is the correct field to push Job info to?
Can I push changes to this field?

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: Edit Customer with PerentRef not working.
« Reply #3 on: July 28, 2011, 06:26:36 PM »
So you're trying to add a Grandparent record? JT Packard would be a Customer, and Charter would be a child record (which in QB would be a "Job" whether or not it's actually a Job or a location or a subdivision of JT Packard.) By setting the value of the targeted Customer record's ParentRef:FullName to "JT Packard:Charter", you're making it the child of Charter and the grandchild of JT Packard.

"JT Packard" and "Charter" must both already exist in the QB Customer List, with JT Packard already identified as the parent of Charter. Makes sense?

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852

rpaulh

  • Member
  • *
  • Posts: 22
Re: Edit Customer with PerentRef not working.
« Reply #4 on: July 29, 2011, 01:04:05 PM »
Thanks for the response. I am not adding, I'm modifying. The Customer in QB right now has this info:
Customer-"JT Packard";
Company-"Charter";
JobName-"Charter - Manchester",
so in the Customer & Jobs list the "Charter - Manchester" is the child of "JT Packard". I need to push the change to make it "JT Packard":"Charter":"Charter - Manchester". We can change them in QB individually but to push changes from FM is much more desired.

Yes, there are already Customers in QB set up this way so the JT Packard:Charter, parent:child relationship is there.

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: Edit Customer with PerentRef not working.
« Reply #5 on: July 30, 2011, 05:51:47 AM »
QB must be opened in single-user mode to change the parent in a Mod request. There are also some potential issues from Currency and VAT if you're using one of the non-US versions. Could either be the problem in your case?


Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852
« Last Edit: August 01, 2011, 07:07:36 AM by Geoffrey Gerhard »

rpaulh

  • Member
  • *
  • Posts: 22
Re: Edit Customer with PerentRef not working.
« Reply #6 on: August 01, 2011, 06:34:50 AM »
No, I am in Dallas so the version is probably not the issue, but I did not know about the single-user setting. Will try that next.

There is one more question. Do I push the FM Job Name field to the QB JobTypeRef::FullName field, or somewhere else?

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: Edit Customer with PerentRef not working.
« Reply #7 on: August 01, 2011, 07:11:35 AM »
Not if FM Job Name describes the ancestry of the Customer record you're modifying. You'd target the QB field identified by "ParentRef:FullName" in your Mod request. If the value is really a Customer Type and not a Customer FullName, then yes--but know going in that QB would need to have a CustomerType with that value already defined.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852

rpaulh

  • Member
  • *
  • Posts: 22
Re: Edit Customer with PerentRef not working.
« Reply #8 on: August 01, 2011, 08:01:29 AM »
Using my example from before; I have all three of those pieces of data in FM. I can push Customer to Customer(correct?) & Company to Company(correct?), but where do I push what will end up in the QB JobName field ("Charter - Manchester" in the example)? Does that go to ParentRef:FullName?

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: Edit Customer with PerentRef not working.
« Reply #9 on: August 01, 2011, 08:29:31 AM »
One of the challenges of integrating FileMaker Pro and QuickBooks is matching fields in FMP to their equivalents in QB. Because QB integration is very structured, the process is made more difficult when QB field names are used interchangeably. In the QB Customer List, the "Name" field may or may not contain the same value as "CompanyName", but the value in the QB CompanyName field has no significance in the push/pull process of integrating FMP and QB.

In addition, the QB User Interface field names are sometimes irrelevant/misleading when trying to identify a field for matching purposes. Outside the QB UI, there is no such thing as a Customer or JobName field. A Customer record has a Name value, which must be unique. If a Customer is a child of another Customer, it has a ParentRef:FullName value. The FullName value is a hierarchy that describes the ancestry to the current record using a string that contains the unique values in each generation's Name field like this: "Grandparent:Parent:Child:Job". The value of FullName for Grandparent is "Grandparent", for Parent is "Grandparent:Parent", for Child is "Grandparent:Parent:Child", and for Job is "Grandparent:Parent:Child:Job". If you had a Customer record with a name value of Job II, you could issue a CustomerMod request that included PCQB_RqAddFieldWithValue( "ParentRef:FullName" ; "Grandparent:Parent:Child" ; "STRTYPE" ) to have the "Job II" Customer record adopted by the "Child" Customer record.

Although "Customer", "Company", and "JobName" are names that have no meaning when mapping fields from FMP to QB, your description of the hierarchical relationship of JT Packard to Charter suggests that they are, in fact, existing Customer records inQB. As long as you also have an existing Customer List record with the Name "Charter - Manchester" you should be able to modify it by assigning a ParentRef:FullName value of "JT Packard:Charter". As I mentioned earlier, you'll need to know the current EditSequence value at the time you send the CustomerMod request.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852

Jerry Friedman

  • Member
  • *
  • Posts: 1
Re: Edit Customer with PerentRef not working.
« Reply #10 on: August 05, 2011, 04:09:29 PM »
My issue is related to this.

My client needs his QB set up as 'Customer' = Company and 'Job' = Employee. To do this, I need to push the Employee Name from FM to the "Job Name" field in QB. The Intuit OSR does not have a "Job Name" field. Productive Computing thinks it's the "JobTypeRef::FullName" field.

I can CustomerAdd the company. How do i CustomerAdd/Mod a new job name to add employees?

Thanks

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: Edit Customer with PerentRef not working.
« Reply #11 on: August 06, 2011, 01:29:45 PM »
You'd create two new Customer records in QB. After completing the CustomerAdd request for "Company", you'd make another CustomerAdd request that uses "Employee" as the value of the Customer Name element and "Company" as the value of the Customer ParentRef:FullName element.

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852