cancel
Showing results for 
Search instead for 
Did you mean: 

Can I get Sum of one UDF which is at line level of Sales Order

Former Member
0 Kudos

Hi to All Gurus / Experts,

I had added one udf named U_SpPriceMT (Units and Total) Amount, i need its sum at Header level udf without using SDK. Can i use Formatted Search..? How ?

Please guide me to resolve this problem..

Thanks..

Chintesh Soni

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hai Chintesh,

Yes you can use formatted search to do it

example you have 3 UDF in Purchase Order Form

U_1 , U_2 and U_3

in U_3 u must defined formatted search using this code

[code]

'================================

declare @f as nvarchar(10)

declare @e as nvarchar(10)

select @f = $[$142.U_1] ' $[$<NoForm>,<NoItem>]

select @e = $[$142.U_2]

select cast(@f as decimal(10,2)) * cast(@e as decimal(10,2))

'============================================

[/code]

and after defined this code, u can enable the checkbox Auto refresh when fields change to get the event

Reward Point if this help You

Regards,

Arthur Siwan

Former Member
0 Kudos

Dear Arthur Siwan,

I got your point.

But my requirement for SALES ORDER

I have got two UDF

one U_1 at Title level i.e. in ORDR

second U_2 at Row level i.e. in RDR1

now at the time of SO entry I have seleced 5 different Items. All items have Prices from PriceList1. I have got prices of that selected items in U_1 through Formatted search.

Now I would like to have sum of that U_1 in U_2 without using SDK.

Thanks dear for replying.. Awaiting more tips and solution on this from your side.

Thanks again.

Former Member
0 Kudos

Hi Chintesh,

If you want to do this calculation before the Sales Order is added to the database then it is not possible using formatted searches (because you can't sum line values into a header field) - only SDK will help you here.

If you are talking about calculating the value after the SO is added then it's just a matter of summing RDR1.U_MyLineUdf etc.

Hope that helps.

Regards,

Andrew.

Former Member
0 Kudos

Hai Chintesh,

sorry I'm kind of busy with my add ons, so I didn't tried with SALES ORDER

but for information this below is code for title level

[code]select @f = $[$142.U_1] ' $[$<NoForm>,<NoItem>] [/code]

and this below code for row level

[code]select @f = $[$<NoMatrix>,<NoColumn>,0] [/code]

you can combine both of these code to your formated search in SALES ORDER FORM

Hope this will help you

Regards,

Arthur Siwan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Chintesh Soni,

If it is needed in the print out you can use sum column in the PLD template.

Go to Sales Order template

Create a database Field to call the UDF.

Add a Formula field in operation select sum column and select the UDF field FieldID.

if it is needed in the form

Select sum (rdr1.U_UDF) from RDR1

Former Member
0 Kudos

Thanks Dear for replying the thread,

I thinnk i have not explained the requirement properly in my thread. I want to make sum of one UDF called U_SpPriceMT which is in RDR1 and I need its sum at U_TotalPrice which is in ORDR.

I want to create one approval process based on this.

Thanks..

Chintesh Soni

91 94276 08674