Productive Computing, Inc. Support Forum

Plug-ins => FM Books Connector => Topic started by: Ferrell on November 22, 2010, 12:01:55 PM

Title: Pushing to Customer Centre Defined Fields used in INVOICE
Post by: Ferrell on November 22, 2010, 12:01:55 PM
I having trouble identifying pushing to fields defined via the Customer Centre and added to the invoice. The OSR does not appear to make a clear indication of how to use the Customer Centre Defined Fields.

Customer Centre > Edit Customer > Additional Info (TAB) > Define Fields.

In my case I need to push to the fields per the screen shots:
- Work Request
- Site Address
- Customer No.

I have tried doing the PCQB_RqDataExtMod after the invoice PCQB_RqExecute and before the session is closed and it fails to make the change but no errors are reported.

NOTE: using the PCQB_Demo File.

Script steps before hand setup the Invoice Push and opens the session, the invoice push on these elements are successful.

TxnID is captured before this in Main::gPush_Invoice TxnID

DataExtMod portion of script.
Set Field [Main::gResult; PCQB_RqNew ("DataExtMod")]
Set Field [Main::gResult; PCQB_RqAddFieldWithValue("OwnerID";"0")]
Set Field [Main::gResult; PCQB_RqAddFieldWithValue("DataExtName";"Work Request")]
Set Field [Main::gResult; PCQB_RqAddFieldWithValue("TxnDataExtType";"Invoice")]
Set Field [Main::gResult; PCQB_RqAddFieldWithValue("TxnID";Main::gPush_Invoice TxnID)]
Set Field [Main::gResult; PCQB_RqAddFieldWithValue("DataExtValue";Main::WorkRequest)]
#
#Execute
Set Field [Main::gResult; PCQB_Execute]
Perform Script ["Check for Errors"]
#
#
Set Field [Main::gResult[2];PCQB_EndSession]

Script continues on with commit records and asking user if they want to see the QB invoice.
Title: Re: Pushing to Customer Centre Defined Fields used in INVOICE
Post by: Chris on November 24, 2010, 05:50:54 PM
Hi Ferrell

Ensur that "Main::Work Request" actually has a value that is accessible in the context of the script.  Use Script Debugger and the Data View to see the contents fo the field when the step executes.

Chris

Title: Re: Pushing to Customer Centre Defined Fields used in INVOICE
Post by: kurchy on January 20, 2011, 10:38:45 PM
Did you ever get this to work?  If so I'd love to here how, as I'm trying to access the same user defined fields but in my case pull instead of push and have had no luck either.
Title: Re: Pushing to Customer Centre Defined Fields used in INVOICE
Post by: Geoffrey Gerhard on January 21, 2011, 10:28:20 AM
See reply in Pulling Custom Field Data thread.