web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

custom service dataArea

(1) ShareShare
ReportReport
Posted on by 1,965
Hi,

1. When creating custom services, do we need to put legalEntity as an input to the service (contract class)? then use changeCompany()?

2. Because when calling the custom service via C#, i know that DataAreaId can be specified by callContext and without even adding legal entity as an input to the service or using change company(). What is call context here and how does it specify the dataAreaId in the background?
CallContext callContext = new CallContext { Company = "USMF" };
sessionInfo = ((ABCService)channel).getDetails(new getDetails(callContext,request1));

3. But if i will call the custom service via postman as json, then how i'm going to specify the legal entity without having the dataArea as an input and without using changeCompany function?
 
4. In conclusion, is it needed? if yes then when and why?
I have the same question (0)
  • Suggested answer
    Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi,
     
    It depends on your case, in general the legal entity is determined based on the user that is used on the integration, but if you want to add the data to another legal entity then you should add dataarea Id as parameter in the contract class.

    Also check the following link it maybe helps you:
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • .. Profile Picture
    1,965 on at
    Hi Waed,

    Thanks but this doesn't answer my questions.
  • .. Profile Picture
    1,965 on at
    Hi,
     
    Any help?
  • Suggested answer
    Martin Dráb Profile Picture
    237,805 Most Valuable Professional on at
    What you actually mean by saying "when calling the custom service via C#" is that you're using the SOAP endpoint. Which language you use (if any at all) is irrelevant and you also can use the JSON-based endpoint from C#, but there is no CallContext in such a case. As far as I know, you need to add the company to the contract if you're using the JSON-based endpoint.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans