Notifications
Announcements
No record found.
HI,
Can somebody suggest me the best approach to integrate and post the Product receipt and invoice for Purchase order in D365.
Regards,
Pradeep
*This post is locked for comments
Hi Pradeep,
Please elaborate. From where to where does the data need to flow? Will there be an approval or check required before the invoice can be posted?
Hi Andre,
I want integrate the data from a third party system into AX. There shall be no condition for approval as such now.
My customer feels Odata is bit slower and they need some better approach as the data would be larger in the future.
Thus, I wanted a scalable approach for this scenario and I would like to do a POC using OdataEntities. Thus, If I import the data using Odata, how shall I post the Product receipt and confirmation?
Aha, so "to integrate" means a one-way communicate from another system to AX, which will allowing creating purchase orders and some kinds of posting. Is that correct?
You can use OData actions to add logic (such as posting) to entities.
Hi Martin,
Yes it’s one way communication.
My customers are feeling using OData entities the performance is very slow.
Do you suggest any other approach?
If I’m using OData entities, which event do you suggest to write the posting logic?
You said you wanted to "to do a POC using OdataEntities", so that's what I was helping with. I suggested you should use OData actions, not data entity events. OData actions can contain any arbitrary logic (therefore they can do posting too). They're implemented as X++ methods; you can see a few examples in documentation.
There are other possible approaches, but giving up OData just because of a feeling sounds wrong. I suggest you reject the discussion about feelings and turn it to a discussion about performance goals and measurements.
I have created the Odata action, as suggested in the proposed link. Can you please guide me, how to trigger this Action from .net?
Though we have many standard OdataActions. When I checked their metadata, I don't see any attribute "FunctionImport" as said in the document.
How you call OData actions from .NET depends on which API you use. Are you using proxy classes generated by the OData Client Code Generator or something else?
The page doesn't contain any reference to "FunctionImport", therefore I don't know what you mean.
If you see the screen shot in the link, when methods are exposed they should be part of metadata. But I didn't find any in Standard entities.
In this example, the SysODataActionAttribute class decorates the CalculateMaintenanceDuration method that is exposed as an action. The first argument of the attribute is the publicly exposed name of the action, and the second argument indicates whether this action is always available. Methods that are exposed as actions can return any primitive type or another public updatable view. After this method is exposed, it appears in the OData $metadata. Here is an example.
docs.microsoft.com/.../1_odata.png
What do you want to hear about the piece of documentation you've quoted. Is there something you don't understand?
What do you mean by "I didn't find any in Standard entities". Do you mean that you didn't find entities with actions? Try finding references of the attribute.
Note that you still didn't tell us which .NET API you're using to call OData services. We can't tell you how to call OData actions through your API until you tell us which API it is.
I'm using the Proxy classes generated by OdataClientCodeGeneartor.
I mean, I did find entities with actions for example ProjectsEntity. But the actions inside the entity are not seen in the metadata.
Example: GetProjectTypes method is an action.
My question is, why is that we are not able to see these actions as a part of metadata. But MS document as stated above says, these methods when exposed would be part of metadata.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2