cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Total Before Discount from active A/R Invoice by FMS

Former Member
0 Kudos

Hi All,

I need Total Before Discount from active A/R Invoice to one of the udf. For that I have tried Query as below :

Select $($22.0.0) / select $($22.0.Number) / select $($22.0.Currancy)

I have use squre bracket in query.

but it shows me Internal Error - 3006

Can any body help me to resolve this please.

With Best Regards,

Chintesh Soni

Accepted Solutions (1)

Accepted Solutions (1)

vijay_kumar1
Contributor
0 Kudos

Hi Chintesh Soni,

Try this query

SELECT $[$-22.0.NUMBER]

Regards,

Vijay Kumar

SAP Business One Forums Team

Former Member
0 Kudos

Thanks Dear,

I have tried the same but still it is showing error

Internal Error (3006) occoured (Message 131/183)

Pl Guide.

With Warm Regards,

Chintesh Soni

Former Member
0 Kudos

Hi Chintesh,

This query does not work in UDF. Try linking the same query to the Customer ref field on the invoice and it will work fine. You will need to specify the table name for the query to work on UDF -

SELECT $[OINV.DocTotal.number]+$[OINV.DiscSum.number]-$[OINV.VatSum.number]

You might need to improve on the query to take care of FC invoices.

Hope this helps.

Regards,

Hamsa

vijay_kumar1
Contributor
0 Kudos

Hi Chintesh,

As mentioned, use minus sign ' - ' before 22 in the query and make sure the udf is created in the Header Level.

Regards,

Vijay Kumar

SAP Business One Forums Team

Former Member
0 Kudos

Hi Vijay,

I tried the "-" and it works. Any logic behind this? When do we use this "-"? Please advice.

Regards,

Hamsa

Answers (3)

Answers (3)

Former Member
0 Kudos

I forgot one sign, it should be

  • SELECT $[$-22.0.number\].

Former Member
0 Kudos

Thanks Gordon, Thanks to All who has give me support.

It is resolved with your help.

With Warm Regards,

Chintesh Soni

+91-09427608674

Former Member
0 Kudos

You have to assign this query to UDF for Formatted Search. It can not be run from any folder directly.

Former Member
0 Kudos

Hi Gordon,

I have save the Query through Query Manager. Then I moved to UDF -> Presh Shift + F2 -> Click on Search by Saved Query -> Dbl Click on the bar and select the query from the list opened. -> Update.

Then i have press Shift + F2 on the udf and it shows the error.

Please correct me if i am doing anything wrong.

Please guide.

Warm Regards,

Chintesh Soni

Former Member
0 Kudos

Hi

The correct query is:

  • SELECT $[$22.0.number\].

However, this query has to assign to FMS to run. It is not runnable through Tools - Query.

Thanks,

Gordon

Former Member
0 Kudos

Thanx Gordon,

I have tried the query u have send.

I have save it. In FMS - > select the query.

Still it is showing same error. I m using SBO 2005 B - PL 25.

Pl Guide.

Thanks and Regards,

Chintesh Soni