Productive Computing, Inc. Support Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

SMF - Just Installed!

Pages: [1]   Go Down

Author Topic: Create Bills using Datail_Type = "SalesItemLineDetail"  (Read 461 times)

Veselko

  • Member
  • *
  • Posts: 9
Create Bills using Datail_Type = "SalesItemLineDetail"
« on: April 25, 2017, 01:51:41 AM »

Hi all,

Is it doable to create a Bill using Detail_Type = "SalesItemLineDetail" instead of "AccountBasedExpenseLineDetail" ?

I want to create where I will use in line items ItemRef (from Products and Services) instead of using AccountRef (from Chart of Accounts).

Thanks in advance.
« Last Edit: April 26, 2017, 08:12:02 AM by Veselko »
Logged

Veselko

  • Member
  • *
  • Posts: 9
Re: Create Bills using Datail_Type = "SalesItemLineDetail"
« Reply #1 on: April 26, 2017, 01:53:42 AM »

To be more clarify, I'm sending those 2 screenshots:

1.) When I creating bill, I leave empty first portal with Accounts, and click on "Item details". (1st attachment)

2.) In rows PRODUCT/SERVICES is dropdown list of Product and Services (2nd attachment). On the right side I relate Bill with customer, so later I can just choose already pre-populated data for creating Invoice.

So, in script for creating/pushing Bills, instead of lines:

Code: [Select]
Set variable[$$Result; Value: PCQO_RqAddFieldWithValue( "DetailType" ; "AccountBasedExpenseLineDetail" )]
Set variable[$$Result; Value:PCQO_RqAddRelatedRecord( "AccountBasedExpenseLineDetail" )]
Set variable[$$Result; Value:PCQO_RqAddFieldWithValue( "AccountRef::value" ; "VALUE FROM CHART OD ACCOUNTS" )]

I believe that I need to put something like this:

Code: [Select]
Set variable[$$Result; Value: PCQO_RqAddFieldWithValue( "DetailType" ; "SalesItemLineDetail" )]
Set variable[$$Result; Value:PCQO_RqAddRelatedRecord( "SalesItemLineDetail" )]
Set variable[$$Result; Value:PCQO_RqAddFieldWithValue( "ItemRef::value" ; "VALUE FROM PRODUCTS AND SERVICES" )]


When I put it in script, I get result:
Error executing request

"CODE: 2020

SEVERITY: ValidationFault

MESSAGE: Required param missing, need to supply the required value for the API

Required parameter Line.DetailType is missing in the request

SOURCE: PCQO_RqExecute"


Does anyone have idea what I'm doing wrong here?

Thank you in advance,
Veselko
Logged

Veselko

  • Member
  • *
  • Posts: 9
Re: Create Bills using Datail_Type = "SalesItemLineDetail"
« Reply #2 on: April 26, 2017, 08:10:08 AM »

I found solution! :)


Take a look on attachment.

Cheers!






Logged

Veselko

  • Member
  • *
  • Posts: 9
Re: Create Bills using Datail_Type = "SalesItemLineDetail"
« Reply #3 on: May 16, 2017, 06:20:17 AM »

Hi all!

One question related with attachment from my previous post.

How can I on the fly, when script add new related record "ItemBasedExpenseLineDetail, to catch id of added item and pull it back into FM?


Thanks in advance!
Logged
Pages: [1]   Go Up