Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
29%
500 - 800 GB
3%
800 - 1200 GB
8%
1200 - 1500 GB
8%
1500 - 2000 GB
11%
> 2000 GB
24%
Total votes: 79

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 20th November 2019, 17:02
martin.f martin.f is offline
Junior Member
 
Join Date: Nov 2019
Posts: 10
martin.f is on a distinguished road
Baan: LN 10.5 - DB: Microsoft SQL - OS: Microsoft Windows 10
Create Price Book Entry
Baan: Infor ERP 10.5
C/S: None/Unknown

Hello,
I am new to Baan/ Infor LN extension development.
I try to create a price book entry like this:

Code:
error.found = dal.new.object("tdpcg031")
        if error.found
                then
                        dal.set.error.message("@Cannot update tdpcg031 for item %1$s.", i.item)
                        return(DALHOOKERROR)
                
                else
                        dal.set.field("tdpcg031.prbk", pb)                                 
                        dal.set.field("tdpcg031.item", i.item)
                        dal.set.field("tdpcg031.curn", cur)
                        dal.set.field("tdpcg031.qtun", cuni)
                        dal.set.field("tdpcg031.bapr", pr)
                        dal.set.field("tdpcg031.prty", tp)
                        dal.set.field("tdpcg031.migt", thres)
                        dal.set.field("tdpcg031.brty", tdpcg.brty.min)
                        dal.set.field("tdpcg031.prun", "pcs")
                error.found = dal.save.object("tdpcg031")
                if error.found then
                        dal.set.error.message("@Cannot update tdpcg031 for item %1$s.", i.item)
                        return(DALHOOKERROR)
                        
                endif
                endif
When running this code dal.save.object raises an error:

The field "quantity unit" has an invalid value for "price book position".
Unit "pcs" in unit set "" not exisistant.


The standard unit set in our system is "100". The variable cuni hast the value "pcs".
I think I should tell the system that it must take the "pcs" of unit set "100".

What do you think? I just want to create a price book entry.

Thanks
Martin

Last edited by martin.f : 20th November 2019 at 18:53.
Reply With Quote
Sponsored Links
  #2  
Old 21st November 2019, 09:17
martin.f martin.f is offline
Junior Member
 
Join Date: Nov 2019
Posts: 10
martin.f is on a distinguished road
Baan: LN 10.5 - DB: Microsoft SQL - OS: Microsoft Windows 10
I've attached a screenshot with the session what I mean with "unit set".

Regards
Martin
Attached Images
File Type: png unit_set.PNG (18.2 KB, 6 views)
Reply With Quote
  #3  
Old 21st November 2019, 14:05
JaapJD's Avatar
JaapJD JaapJD is offline
Guru
 
Join Date: Sep 2002
Location: Netherlands
Posts: 852
JaapJD will become famous soon enoughJaapJD will become famous soon enough
Baan: BaanIV, BaanERP, ERP LN 6.1 - DB: Oracle, SQL Server - OS: Unix, Windows
The unit must exist in the unit set of the item.
(Maybe the item cannot be found, because your i.item is not formatted correctly in the 2nd segment.)
Reply With Quote
  #4  
Old 21st November 2019, 16:04
martin.f martin.f is offline
Junior Member
 
Join Date: Nov 2019
Posts: 10
martin.f is on a distinguished road
Baan: LN 10.5 - DB: Microsoft SQL - OS: Microsoft Windows 10
Thumbs up

That was the problem, I hard coded the article number for testing as a string and I think some spaces before or sth. like that was missing.

Thanks!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Developer Erp LN RavCOder General Discussion & Chat 3 24th July 2019 19:09
cost price to standard price updation Babuplus Blogs and Web links 0 12th July 2011 19:02
Can item from Product Config take Price Book price? dv3-1028 Manufacturing & Supply Chain 0 13th December 2010 11:27
The price book is not effectived when created the Purchase Order,why? freeppy Distribution, Transportation & Warehousing 2 18th August 2008 10:15
Copy complete price book aldendata Distribution, Transportation & Warehousing 3 16th April 2003 17:15


All times are GMT +2. The time now is 17:27.


©2001-2018 - Baanboard.com - Baanforums.com