Jump to content

Kent Searight

Members
  • Posts

    756
  • Joined

  • Last visited

Everything posted by Kent Searight

  1. Thanks Geoffrey, that's very helpful in getting me started. Intuit's QB Desktop API Reference documentation on getting balances is not very helpful. Cheers! -Kent
  2. Can someone please steer me in the right direction for getting the current available credits balance of a customer? I have Credit Memos and Invoices being created in QB Desktop via the plugin and the next step is to apply any balance of available credits or partial payments to an invoice when generating it. I think I figured out how to do that but after looking at Intuits Developers API documentation online I'm not sure how to just request a balance. Is the General Summary Report query where I need to start? Thanks in advance! -Kent
  3. I have a shell script that I want to run as a scheduled system-level script on FMS 19 on Linux. When I call the script from a Terminal it works as expected. But when I try to run it as a scheduled script I get "Error 732 my-server.com Schedule "myScript" aborted; invalid account name or password." It's in the correct FMS Scripts directory I'm trying to run it as the default user "fmserver" The file is owned by fmserver file permission is 755 What am I missing here? Am I expected to authenticate in the script? If so, which credentials? The ones I use to authenticate when I use fmsadmin commands in the CLI? Thanks in advance! -Kent Update 6/18/20121 I tried this: Added a system user to the host, set the password and made it a member of the "fmsadmin" group Made the new user the owner of the shell script file Verified file permissions were correct Modified the /etc/sudoers file as instructed here under Notes section. Entered the new user's credentials in the FMS admin console (tried as just the user name, then tried as [email protected]) I'm still seeing authentication errors in the FMS Event.log that are preventing the script to run. When I try to run it as just the username I get "Warning 522 my-host.com SECURITY: Administrator authentication failed: "myNewUser [10.0.0.137]" (fmsadmin)" When I try to run it as [email protected] I get "Error 732 my-host.com Schedule:my schedule aborted; invalid account name or password"
  4. Figured it out. I was pulling the wrong ID from the SalesRepRef query. Instead of the ListID I was pulling the ID from the FullName/ListID aggregate. I or someone else must've changed the script at some point after adding the first two reps. The rep record that kept failing is newer than them. Do you know what that ID is for? It's the ID in the salesRepRef element preceding the rep's name. { "fullName" : "John Smith", "initials" : "JS", "listID" : "80000002-1616176105", "salesRepRef" : "8000002F-1616176095 John Smith" }
  5. Hi Geoffrey, The message I get is: MESSAGE: Object "8000002F-1616176095" specified in the request cannot be found. QuickBooks error message: Invalid argument. The specified record does not exist in the list. I verified that this particular SalesRep is active as an employee and as a SalesRep. Same as the ones that work. And just like the other two, it isn't listed as a Vendor nor does it have a listing in the Other Names list.
  6. I have a solution that creates invoices in QB Desktop Pro 2017 using FileMaker 19 on Win 10. When I try to assign 1 particular sales rep to that invoice I get Error 3120 when the PCQB_RqExecute step is called. The error explanation is that it's an invalid argument and that the specified record does not exist in the list. The ListID I'm using for the sales rep is from a query to get all the Sales Reps' List IDs. I get List IDs for the 3 sales reps when I do this query. Two of them work as expected when I send their sales rep List IDs as part of the InvoiceAdd process, but one of them is problematic and always results in error 3120. I've compared the ListID I get back in the query to the one I'm sending in the InvoiceAdd script and I've confirmed a couple of different ways that they're an exact match. Another step I took in troubleshooting was to make sure I didn't have the SalesRep List record open, to eliminate the possibility of a record locking issue in QB. I also forced the index to rebuild in the field where the List ID is stored. Here's what I get from PCQB_SGetXML( "Request" ; "" ) See the value in <SalesRepRef><ListID> element. That's what's causing the issue w/ only one particular sales rep. Anyone have any ideas on what the problem might be? From what I can see it should work because I think I've eliminated all doubts about whether the SalesRep ListID value is valid. Thanks in advance! -Kent <?xml version="1.0" encoding="ISO-8859-1" ?> <?qbxml version="13.0" ?> <QBXML><QBXMLMsgsRq onError="stopOnError"> <InvoiceAddRq><InvoiceAdd> <CustomerRef> <ListID> 80000019-1582766293 </ListID> </CustomerRef> <TxnDate> 2021-06-12 </TxnDate> <SalesRepRef> <ListID> 8000002F-1616176095 </ListID> </SalesRepRef> <ShipDate> 2021-06-12 </ShipDate> <InvoiceLineAdd> <ItemRef> <ListID> 80000048-1583688064 </ListID> </ItemRef> <Desc> 4.25" Anemone, UPC: 560333098761, 10 units/product, $2.68/unit </Desc> <Quantity> 112.00000 </Quantity> <Rate> 26.80 </Rate> </InvoiceLineAdd> </InvoiceAdd> </InvoiceAddRq> </QBXMLMsgsRq> </QBXML>
  7. Got it to work exactly as needed. I'd forgotten to append "SalesRepRef" with "::ListID" in PCQB_RqAddFieldWithValue. (Duh 🤪) On the plus side I learned some valuable stuff from the PCQB_SGetXML call. I'd never used it before. That's a nice addition to the developing/debugging toolbox. Thanks again! -Kent
  8. You're right. I was using the SGetStatus call after I'd get an error but then I was parsing out only what I thought I needed (wrongly, as it turns out). Here's the full response. CODE: -1000 SEVERITY: failed validation MESSAGE: Error at SalesRepRef Reason: Text is not allowed in the context of element 'SalesRepRef' according to DTD/Schema. Expecting: ListID, FullName. Field Value: 80000001-1586535406 --- Then I did as you suggested and got the result of PCQB_SGetXML( "Request" ; "" ). That resulted in all the following: <?xml version="1.0"?> <QBXML> <QBXMLMsgsRs> <InvoiceAddRs statusCode="0" statusSeverity="Info" statusMessage="Status OK"> <InvoiceRet> <TxnID>8E0-1616611379</TxnID> <TimeCreated>2021-03-24T11:42:59-08:00</TimeCreated> <TimeModified>2021-03-24T11:42:59-08:00</TimeModified> <EditSequence>1616611379</EditSequence> <TxnNumber>418</TxnNumber> <CustomerRef> <ListID>8000002B-1583010213</ListID> <FullName>Stark St. Nursery</FullName> </CustomerRef> <ARAccountRef> <ListID>8000001E-1582670087</ListID> <FullName>Accounts Receivable</FullName> </ARAccountRef> <TemplateRef> <ListID>80000001-1582487741</ListID> <FullName>Intuit Product Invoice</FullName> </TemplateRef> <TxnDate>2021-03-24</TxnDate> <RefNumber>20754</RefNumber> <BillAddress> <Addr1>5050 SE Stark Street</Addr1> <City>Portland</City> <State>OR</State> <PostalCode>97215</PostalCode> </BillAddress> <BillAddressBlock> <Addr1>5050 SE Stark Street</Addr1> <Addr2>Portland, OR 97215</Addr2> </BillAddressBlock> <ShipAddress> <Addr1>5050 SE Stark Street</Addr1> <City>Portland</City> <State>OR</State> <PostalCode>97215</PostalCode> </ShipAddress> <ShipAddressBlock> <Addr1>5050 SE Stark Street</Addr1> <Addr2>Portland, OR 97215</Addr2> </ShipAddressBlock> <IsPending>false</IsPending> <IsFinanceCharge>false</IsFinanceCharge> <PONumber>4450112</PONumber> <TermsRef> <ListID>80000002-1582487751</ListID> <FullName>2% 10 Net 30</FullName> </TermsRef> <DueDate>2021-04-23</DueDate> <ShipDate>2021-03-24</ShipDate> <ShipMethodRef> <ListID>80000005-1586535335</ListID> <FullName>Delivery</FullName> </ShipMethodRef> <Subtotal>1747.42</Subtotal> <SalesTaxPercentage>0.00</SalesTaxPercentage> <SalesTaxTotal>0.00</SalesTaxTotal> <AppliedAmount>0.00</AppliedAmount> <BalanceRemaining>1747.42</BalanceRemaining> <IsPaid>false</IsPaid> <IsToBePrinted>true</IsToBePrinted> <IsToBeEmailed>false</IsToBeEmailed> <SuggestedDiscountAmount>34.95</SuggestedDiscountAmount> <SuggestedDiscountDate>2021-04-03</SuggestedDiscountDate> <InvoiceLineRet> <TxnLineID>8E2-1616611379</TxnLineID> <ItemRef> <ListID>80000048-1583688064</ListID> <FullName>Color:4.25" Anemone</FullName> </ItemRef> <Desc>4.25" Anemone, UPC: 560333098761, 10 units/product, $2.55/unit</Desc> <Quantity>40</Quantity> <Rate>25.50</Rate> <Amount>1020.00</Amount> <SalesTaxCodeRef> <ListID>80000002-1582487741</ListID> <FullName>Non</FullName> </SalesTaxCodeRef> </InvoiceLineRet> <InvoiceLineRet> <TxnLineID>8E3-1616611379</TxnLineID> <ItemRef> <ListID>80000017-1583093374</ListID> <FullName>Organic Herb:Organic 4" Herbs Rnd plastic</FullName> </ItemRef> <Desc>Organic 4" Herbs Rnd plastic, UPC: 342941800017, 10 units/product, $1.68/unit</Desc> <Quantity>33</Quantity> <Rate>16.80</Rate> <Amount>554.40</Amount> <SalesTaxCodeRef> <ListID>80000002-1582487741</ListID> <FullName>Non</FullName> </SalesTaxCodeRef> </InvoiceLineRet> <InvoiceLineRet> <TxnLineID>8E4-1616611379</TxnLineID> <ItemRef> <ListID>8000001A-1583093527</ListID> <FullName>Organic Veg.:Org 606 Veg Jumbo</FullName> </ItemRef> <Desc>Organic 606 Vegetables Jumbo Tray Pack, UPC: 342941800020, 6 units/product, $2.09/unit</Desc> <Quantity>13</Quantity> <Rate>12.54</Rate> <Amount>163.02</Amount> <SalesTaxCodeRef> <ListID>80000002-1582487741</ListID> <FullName>Non</FullName> </SalesTaxCodeRef> </InvoiceLineRet> <InvoiceLineRet> <TxnLineID>8E5-1616611379</TxnLineID> <ItemRef> <ListID>80000049-1593535470</ListID> <FullName>Shipping</FullName> </ItemRef> <Desc>Shipping &amp; Handling</Desc> <Quantity>1</Quantity> <Rate>10.00</Rate> <Amount>10.00</Amount> <SalesTaxCodeRef> <ListID>80000002-1582487741</ListID> <FullName>Non</FullName> </SalesTaxCodeRef> </InvoiceLineRet> </InvoiceRet> </InvoiceAddRs> </QBXMLMsgsRs> </QBXML> --- Since there is no SalesRepRef element in the XML, does that mean it's not possible for the AddInvoice request to add a sales rep to an invoice? BTW, the reason I'm trying to do this is to assign the sales rep of the order in FileMaker to the invoice in QB. In the Field Value portion of SGetStatus call's response you see a ListID. This is the ListID of the person who's assigned to the customer in Quickbooks, but there are times when the sales rep of an order in FileMaker is not the sales rep assigned in QB. I'm trying to override the default value that QB uses when I do the push. From what I'm seeing now, I'm thinking that it might not be possible. What's your take on it from everything you know now? Thanks a bunch for your help, BTW, it's really appreciated! -Kent
  9. Sorry, I only pasted the end of the message. This is what I get back: "Error at SalesRepRef" (after calling the plugin function PCQB_RqExecute) Severity: failed validation
  10. Severity: failed validation Yeah, I can push and query invoices with no problem.
  11. I'm trying to add a sales rep to an invoice when I push an invoice to QB Desktop, but it keeps failing validation (error -1000) when I try to add the Sales Rep's ListID, the Sales Rep's FullName, SalesRepEntityRef value, etc. to the field "SalesRepRef". To be clear, I've tried all the different values to see if any work. I'm not trying to set them all at the same time. 🙃 Any ideas if I'm using incorrect values, i.e., values it's not expecting, or I'm trying to set the wrong QB field, or is this something that's just not possible? Thanks in advance! -Kent
  12. Hmm, there still seems to be something else causing the problem. I think it might be the yum update command (not upgrade) that causes its inability to boot. I've done a reboot after every single yum install (installed a few helpful tools, apache, php), opened firewall ports, etc. Everything works fine until I do the yum update. Then it won't boot, I just get a machine with the power light on. I probably don't need an update right now, but that's not going to be the case forever. Anyone have any ideas as to why this happens?
  13. I think I solved the problem. It appears that the automatic disk partitioning & setup doesn't define the mount points automatically, at least from what I can gather. When I reinstalled CentOS the 3rd time I manually configured the mount points and it seems to have solved the problem. If any of you who are more well versed than I am in working with CentOS have any additional feedback/comments I'd like to hear it. My knowledge of Linux installations was limited to playing around with them on VMWare and Parallels before this, and they seem to take extra measures to configure everything automatically on installation. Here are resources I found useful: https://docs.centos.org/en-US/centos/install-guide/CustomSpoke-ppc64/ https://sachin.ranadive.org/index.php/2017/07/03/quick-tip-delete-existing-partitions-during-centos-7-installation/ https://www.tecmint.com/linux-file-system-explained/
  14. Hi all, I installed CentOS 7 (minimal) on a Mac Mini 6,2 Server model with Dual HD (250 GB SSD), got FMS 19 running on it, all was well. But if I try to reboot it or restart it the power light comes on but the OS doesn't appear to startup. I thought it was a fluke so I reinstalled everything from scratch, had everything running nicely again, held my breath while I did a reboot ... and the same thing happened. If I connect a monitor to it after a reboot attempt it's blank, i.e., no Terminal, nothing. It doesn't show up on my network at all. Is there something in particular I need to do to get this particular Mac Mini model to run CentOS? I Googled and found nothing. I'd really like to get a little more life out of this machine as a Dev/Test server, so I'd greatly appreciate any help offered. Thanks! -Kent
  15. I'm using Write To Data File script step to keep track of the outcomes of batch transactions in a text file. It's basically a log that users can view to see line-by-line what happened when they ran a batch process (which records succeeded, failed, queued for retry, etc.). Entries into this log have a lot of value to users in the short term, but have little to no value to them as they age. I'd like to purge the oldest entries (at the beginning/top of the file) when the file reaches a certain size. For example, if I want the max file size to be 128K and the new entries make it 130K I'd like to remove the oldest 2K of text in the file at a ¶ or line feed (so I'm only deleting whole lines, not partials). The only way I've figured out how to do this is to read the entire file into a variable, use the Right() function to grab the rightmost 128K, apply some logic to locate the return, then write over the file with the new data in the variable. Is there an easier way of doing this? I feel like I'm taking a Rube Goldberg approach. Thanks in advance! -Kent
  16. Hi Wim, These are exactly what I was looking for. Thanks! -Kent
  17. I'm trying to rethink how I can safely store/access user credentials needed to send mail via SMTP from FileMaker. In solutions I've built prior to the current one I've stored them in a table and used FM's security features to limit access to them. I'm curious if anyone's come up with a better way of dealing with credentials that are required by services called by FileMaker. If so, please let me know. Thanks in advance! -Kent
  18. Hey PCIPal, Thanks for the reply. I fixed the problem and think I figured out where the problem was (although I'm not 100% certain). If you don't mind I'd like to run this by you so I have a better understanding of how plugin/QB sessions are handled. I was beginning the Connector session in a parent script 2 stack calls away from the script that primed the data fields and then posted the request. When I moved the session opener step to a parent script just 1 stack call away from the subscript that executes the post the problem disappeared. Does this behavior make any sense to you? All the scripts called were in the same file. Does a session not realize it exists if the post is more than 1 script stack call away? Or is something else going on you can think of? Thanks again. I appreciate your help. -Kent
  19. Hi, Does anyone know what error code 4101 means? It just started happening when I try to push an invoice to QuickBooks Desktop using the FM Books Connector plugin v12.0.0.2 (64 bit). The script was pushing invoices fine yesterday. The error messages appear when initiating a new request and also when adding related record requests (for the invoice lines). The plugin step returns the result 0, as does FMPA 18 if I do a Get ( LastError ), so neither FMPA nor the plugin seem to think there's an error. Also, I'm seeing a progress bar I've never seen before (see below). It displays for about 20 seconds. I never saw that before today. This is on Windows 10, QuickBooks Pro 2017, FMPA 18. All are up to date. I rebuilt the QB data file, ran the QB file doctor (which said no errors found). Any help is greatly appreciated. -Kent
  20. Turned out I didn't need the headers. The result of --cookie-jar was all I needed. But if I'd wanted the headers too all I'd need to do is follow that option with a variable and it would write to that. Example: --dump-header $myVariable.
  21. Never mind. I got it to work with the following cURL options. -L -d 'username=myaccountname&password=mypassword' --cookie-jar $cookies I'm curious though if anyone knows why FMI chose not to support the --include option.
  22. I'm trying to get a token from an authorization server using cURL in Insert From URL. When I make the following request in Terminal curl -i -X POST -d 'username=myaccountname&password=mypassword' https://authserver.com/login I get the token back in the response header. Since FileMaker doesn't support the --include (-i) option I haven't been able to figure out how to get the response header with the token. Anyone have any ideas on how to accomplish this? Thanks in advance! -Kent UPDATE: Okay, I figured out I can get a response header by using the option --dump-header and setting it to a variable. The only problem now is that the token comes from a redirect location and I'm only getting the response header from the original URL. I'll keep working on it but I'll be happy to get whatever advice anyone can offer in the meantime.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.