Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Update Return Order Lines Using AIF Service

(0) ShareShare
ReportReport
Posted on by 115

Hi All, 

         I am given a task to create a new web service which will receive return orders from a web app and then change the values of three columns of Sales Price, Discount and Tax. They have given a class named UpdateReturn. This class has only one method named 'Update'. This update method icludes code for changing these three columns. 

Now, I want to know How can I use this class in my newly created service so that when I receive a return order through this service, the values of these three fields are automatically changed with the help of this class and its method. 

I have created a new service through Inbound Port. The service is based on SalesSalesOrderService. The create, read, find, delete and update methods are included in the new service. 

I want to know which classes do I need to add more in my newly created service and where this UpdateReturn class will be added and how will it change the values of those columns. 

Please guide me I have no clue what to do and how to start. Till now I have simply created and new service from Inbound port and just activated it. 

For testing purpose, I am about to use a job which will fetch a XML file and create a sales order in AX. 

Currently, I also have SalesSalesOrderService. I have this XML. I can easily create new sales orders through this service as I have created many new sales orders with this service already. Can I use this existing service for above purpose as well ? If yes, then how. If I can use this existing service and you can guide me at where and how I will use UpdateReturn class for this purpose, then I will prefer this existing document service SalesSalesOrderService. 

  • Brijen S. Shah Profile Picture
    292 on at
    RE: Update Return Order Lines Using AIF Service.

    Please refer below link which shows step by step implementation of custom service

    https://sumitsaxfactor.wordpress.com/2012/05/19/create-your-first-custom-service-ax-2012/

    Regards,

    Brijen S. Shah

  • 00030000036294D5 Profile Picture
    115 on at
    RE: Update Return Order Lines Using AIF Service.

    I have already created a new custom service. I have used UpdateReturn class as class of my custom service. I would like to know what do I do next ? If you see in a sales order document service, there are a lot of classes in it like AxdSalesOrder class and salestable and salesline classes and SalesSalesOrder class and so on.

    Do I also need to create all these classes in my custom service as well ?

    Till now, I have created a new custom service and used above class in it. Now please guide me what do I need to do next ?

    Plus, can you suggest how can I test service with a job in AX ?

  • Brijen S. Shah Profile Picture
    292 on at
    RE: Update Return Order Lines Using AIF Service.

    Are you trying to reuse SalesSalesOrderService service or are you creating a new custom service and service group?

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,304 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans