Hi Adeel,
i tried to write the code likethis. display str ItemName() { ConfigId _ConfigId; ConfigName _ConfigName; InventDimCombinationName _InventDimCombinationName; if (CustInvoiceTrans.InventDimId) { _ConfigId=InventDim::find(CustInvoiceTrans.InventDimId).configId; if (_ConfigId) { _ConfigName=ConfigTable::find(CustInvoiceTrans.ItemId,_ConfigId).Name; _InventDimCombinationName=(select inventdimcombination where inventdimcombination.ItemId==CustInvoiceTrans.ItemId && inventdimcombination.inventdimid==CustInvoiceTrans.InventDimId).Name; } } return CustInvoiceTrans.Name + '-' + _ConfigName+'-'+_InventDimCombinationName; } its not showing me any Error. but the required field showing blank. KHALIL UR REHMAN To: Axapta-Knowledge-Village@yahoogroups.com From: adeel...@gmail.com Date: Mon, 30 Mar 2009 07:12:56 +0000 Subject: [Axapta-Knowledge-Village] Re: Method Coding. Hi Khalil, I found that there is the composite key of four fields (ItemId, ConfigId, InventSizeId, InventColorId) in InventDimCombination table. So for an example i am placing the code. hope it will help you out. static void Job6(Args _args) { InventDimCombination idc; ; while select idc where idc.ItemId == "01Shoes" && idc.ConfigId == "Black" && idc.InventSizeId == '7' && idc.InventColorId == "Black-Brow" { info(strFmt("%1",idc.Name)); } } if these fields are passed to this method it will get the Name field from InventDimCombination table. Best Regards, Adeel Shafqat --- In Axapta-Knowledge-Village@yahoogroups.com, Khalil Rehman <khalilrehm...@...> wrote: > > > Dear All, > > > > > > I need your little help regarding Item Name +ConfigName printing on Sales > Invoice & Packing Slip. Which we customize. Now one more little additional > information I need to print, which is InventDimCombination.name field. > > Now the Description will be combination of > ItemName+ConfigName+InventDimCombination.name, which is going to print on > Sale Order Item Description. > > Can you write for me a code for this method. > > Thanks & regards. > > Khalil. > > > Method is as mentioned below: > > > display str ItemName() > { > > ConfigId _ConfigId; > ConfigName _ConfigName > ; > > if (CustInvoiceTrans.InventDimId) > { > _ConfigId=InventDim::find(CustInvoiceTrans.InventDimId).configId; > if (_ConfigId) > { > _ConfigName=ConfigTable::find(CustInvoiceTrans.ItemId,_ConfigId).Name; > } > } > > return CustInvoiceTrans.Name + '-' + _ConfigName; > } > > > > > > KHALIL UR REHMAN > > > > __________________________________________________________ > Drag n� drop�Get easy photo sharing with Windows Live� Photos. > > http://www.microsoft.com/windows/windowslive/products/photos.aspx > _________________________________________________________________ Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx