Hello all ,im using ax 2012 R3
i need to create display method to get purchase agreement Qty and add this method on InventOnhandItem (Form)
i need qty depend on inventlocation dimension
any help please
*This post is locked for comments
Hello all ,im using ax 2012 R3
i need to create display method to get purchase agreement Qty and add this method on InventOnhandItem (Form)
i need qty depend on inventlocation dimension
any help please
*This post is locked for comments
Also notice that AgreementLine is a shared table, therefore you should filter it by DataAreaId.
i need to add a purchase agreement qty on InventOnhandItem form depend on warehouse
Be careful, the InventOnhandItem form is grouped in various ways depending on the dimension selection. You can't use fields that are not grouped on to select anything in your method (and I think InventDimId is not grouped)
"Wrong" still can mean many different things and each of them would require a different solution, therefore it's absolutely crucial to know what exactly is wrong.
By the way, now I noticed the reference to this; I overlooked it because I didn't expect it on the left side.
Can you explain the business logic you're trying to implement by your code?
"It's not working fine" i mean i get wrong qty
i think the problem is inventsum.inventdimid not equal paQty.InventDimId
for this reason i get 0 qty for items
when i comment this code && this.InventDimId == paQty.InventDimId
i get wrong qty
how can i get relation between inventsum table and AgreementLineQuantityCommitment or AgreementLine
sorry for my english :)
"It's not working fine" it's not a very detailed description of your problem, therefore you can't expect detailed answers.
Nevertheless I noticed that your method never refers to the current record ("this"), which is highly suspicious. It will always return quantity for the first item, not for the current item.
You'll have to get used to debugging your code, because it would clearly show you this problem.
im trying to learn
im write this code and it's not working fine with me
i created method in inventsum table
Display AgreementCommitedQuantity getPoQty()
{
AgreementLineQuantityCommitment paQty;
AgreementLine agreementLine;
InventDim inventDim;
select ItemId,sum(CommitedQuantity)
from paQty
group by ItemId
join inventDim
group by inventDim.InventLocationId
where inventDim.inventDimId == paQty.InventDimId
&& this.ItemId == paQty.ItemId
&& this.InventDimId == paQty.InventDimId
return paQty.CommitedQuantity;
}
And what's the problem? Do you know how to write display methods and queries in general? If not, please look into documentation. If you do, please explain your particular issue.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156