I'm attempting to get the discount amount values in SO sales order entry from the record in im_pricecode for the current line.
I'm looking for an easier way to figure out which price code record sage used to determine the unit price. I may resort to just using the svc object and multiple Find attempts to locate the correct record but was hoping the below method would do what I need it to.
I'm trying to use the GetPriceMethod in SO_SalesOrderDetail_Bus inherited from IM_PriceCode_svc.
From the help files it has these arguments,
FUNCTION GetPriceRecord(prcCode$, item$, priceLevel$, divNo$, custNo$, priceRecord$, priceIOL$, priceType$)
I've tried the following,
LET prcCode$ = """", item$ = """", priceLevel$ = """", divNo$ = """", custNo$ = """", priceRecord$ = """", priceIOL$ = """", priceType$ = """";
LET prcCode$ = ""STD"", item$ = ""BOARD-04500"", priceLevel$ = ""A"", divNo$ = ""00"", custNo$ = ""CARTER"", priceRecord$ = ""2"", priceIOL$ = CPL(""Iolist PriceCodeRecord$, PriceCode$, ItemCode$, CustomerPriceLevel$, ARDivisionNo$, CustomerNo$, PricingMethod$, DiscountMarkup1""), priceType$ = ""2"";
msgbox (STR(coHeader'Lines'GetPriceRecord(prcCode$, item$, priceLevel$, divNo$, custNo$, priceRecord$, priceIOL$, priceType$))),ERR=*NEXT
and
LET prcCode$ = """", item$ = """", priceLevel$ = """", divNo$ = """", custNo$ = """", priceRecord$ = """", priceIOL$ = """", priceType$ = """";
LET prcCode$ = ""STD"", item$ = ""BOARD-04500"", priceLevel$ = ""A"", divNo$ = ""00"", custNo$ = ""CARTER"", priceRecord$ = ""2"", priceIOL$ = """", priceType$ = ""2"";
msgbox (STR(coHeader'Lines'GetPriceRecord(prcCode$, item$, priceLevel$, divNo$, custNo$, priceRecord$, priceIOL$, priceType$))),ERR=*NEXT
No dice with either, if I don't use ""ERR=*NEXT"", I get an error about the arguments don't match what's specified
Anybody familiar with this method and the proper way to use it?
Also, the above syntax is providex but I can use vbscript or providex.