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
"Metadata" is a very generic term. Where exactly do you expect to see the actions and why do you think that they should be there?
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.
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.
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.
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.
Hi Martin,
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.
Regards,
Pradeep
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.
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?
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 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?
Regards,
Pradeep
André Arnaud de Cal...
291,979
Super User 2025 Season 1
Martin Dráb
230,848
Most Valuable Professional
nmaenpaa
101,156