Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Is There a Helper Clas...
Finance forum
Unanswered

Is There a Helper Class I Can Use to Get NetAmount for parameters like Unit price, qty..etc?

editSubscribe (1) ShareShare
ReportReport
Posted on by 4
Hi dear community!
 
I have a .NET application that is integrated with D365 FO.
In the application I want the user to suggest an RFQ and a PO that will be sent to D365.
 
But before sending it to D365, I want the user to see the net amount of his input on parameters like: unit price, qty, discount...etc similar to the fields we have in RFQ lines and PO lines.
 
The reason is, I don't want to implement a pricing logic in the .NET Application, instead, I want to use the pricing logic of D365 FO so we don't get conflicts.
 
Is there a helper class or a pricing engine class that I can use to get the net amount for RFQ lines and PO lines?
 
Any advice is appreciated !
 
Thanks in advance !
  • Martin Dráb Profile Picture
    Martin Dráb 223,308 Super User on at
    Is There a Helper Class I Can Use to Get NetAmount for parameters like Unit price, qty..etc?
    The descriptrion of your problem with Table ID isn't clear, but using code of PurchLine table, for example, doesn't make a good sense if you don't want to work with PurchTable and PurchLine. If so, you should use the price engine and such and not these tables. PriceDisc class is the right direction.
     
    You could do something like this:
    PriceDisc_Price priceDisc_Price = PriceDisc_Price::construct();
    priceDisc_Price.parmItemId(...);
    ... other parameters ...
    return priceDisc_Price.price();
  • CU07051452-0 Profile Picture
    CU07051452-0 4 on at
    Is There a Helper Class I Can Use to Get NetAmount for parameters like Unit price, qty..etc?
     
    I have been checking if I can re-use the function that calculates the NetAmount Field (PurchTable.NetAmount) in the PO and RFQ Screens and create a custom service which I can call from the .NET application to calculate the RFQ and PO line Net Amount.
    But it seemed not do-able since there are switch cases using "TableId" to select either PurchTable.tableId or RFQTable.TableId so the function can do a select statement for all the fields that needs to be calculated.
     
    I came across PriceDisc Class, but I'm not sure yet if it will do the job.
  • Martin Dráb Profile Picture
    Martin Dráb 223,308 Super User on at
    Is There a Helper Class I Can Use to Get NetAmount for parameters like Unit price, qty..etc?
    I'm not sure that I understand this question. Can you elaborate it, please?
  • CU07051452-0 Profile Picture
    CU07051452-0 4 on at
    Is There a Helper Class I Can Use to Get NetAmount for parameters like Unit price, qty..etc?
     
    Appreciate your support !
     
    Can we use the calculation method of the LineAmount field in RFQ or PO tables?
  • Martin Dráb Profile Picture
    Martin Dráb 223,308 Super User on at
    Is There a Helper Class I Can Use to Get NetAmount for parameters like Unit price, qty..etc?
    There is a pricing engine in F&O that you can call inside X++ or through a web service (custom service, OData action).
     
    I recently looked for an existing web service for this purpose I was surprised when I didn't find any. Asking fellow MVPs didn't help either. But I guess there could be something, used by either Commerce or the integration with CRM.
     
    If someone knows better, it'll be a good thing to learn.

Helpful resources

Quick Links

Take the Community feedback survey!

Answer this brief 15-question survey about your Community experience…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,375 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,308 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans