Productive Computing, Inc. Support Forum

Plug-ins => FM Books Connector => Topic started by: trebor on September 26, 2013, 02:35:31 PM

Title: CusomerMsgAdd
Post by: trebor on September 26, 2013, 02:35:31 PM
Does anyone have a sample CustomerMsgAdd script?

I add invoices, customers, items  and I am failing at simple customer CustomerMsgAdd.

It may have to do with the "IsActive".  I am using "True".  I don't get any error sent back to my script, but it never shows up in QB.  It does not show up when I "Include inactive" in QB while looking at the Customer Message List.

Any ideas?

Basically I need to add a relatively large text field to print on an invoice and the CustomerMsg has a character length of 101, so I though I would use that. Memo does not display on Invoices, and I cannot access "Long Text" field on the invoice with the FMCOnnector.

Any suggestions would be helpful.
Title: Re: CusomerMsgAdd
Post by: trebor on September 26, 2013, 03:06:50 PM
I got it........ bone head move, I was putting a colon in the field.

Ok I use colons in other areas, but it did not like it in the CustomerMsgAdd field.

Also it was returning an error, I was just not capturing it correctly.

Title: Re: CusomerMsgAdd
Post by: Geoffrey Gerhard on September 27, 2013, 07:13:19 AM
Where, exactly, is the colon?

If it's in the value of the Name element you're passing, I think you're mistaken--it's not a character that needs to be escaped. (Ampersands, quotes, and apostrophes are three that come to mind as problems when they're not converted by the PCQB_SFormatString function. Copy this and evaluate it in FMPro Advanced's Data Viewer to see what I mean by escaping a character...

PCQB_SFormatString ( "You're almost \"there\" & so on: keep at it" & char ( 8230 ) ; "STRTYPE" )

Wrapping a value in PCQB_SFormatString is a good practice, especially when the value is user accessible.


Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852
Title: Re: CusomerMsgAdd
Post by: trebor on October 03, 2013, 09:30:59 AM
I will give the PCQB_SFormatString function a try, but it is working like a charm right now.   Old adage, if ain't broke don't fix it.

I also came across field limitation issues.  I had to go back and write in some field limitation checks to ensure no field exceed a specific length.