Hi All,
I am using On-Prem Business Central.
I am writing one query API to fetch item details from item table along the sales price from sales price list according to the product Id.
and there i need to call a procedure on the field in query column, but it shows it is not possible.
Below is my code :
query 50112 GetAllItemsDetails
{
QueryType = API;
APIPublisher = 'QueryV1';
APIGroup = 'QueryGroup';
EntityName = 'Item';
EntitySetName = 'Items';
elements
{
dataitem(ItemDetails; Item)
{
column(ItemNo; "No.")
{
}
column(Name; Description)
{
}
column(Inventory; Inventory)
{
}
column(PictureId; Picture)
{
}
column(Base_Unit_Price; "Unit Price")
{
}
column(Details; GetDetails()) // This i want to do. but not able to achieve.
{
}
dataitem(Price_List_Line; "Price List Line")
{
DataItemLink = "Asset No." = ItemDetails."No.";
SqlJoinType = LeftOuterJoin;
column(Unit_Price; "Unit Price")
{
}
}
}
}
procedure GetDetails():Text
begin
// my logic
end
Does anyone have any idea about this. How we can achive this by Query API.
If anyone have any code snip please share.
Thanks for your Help.