3
public function productDetails($product_code){
    $url = 'Page/ProductGroups';
    try {
      $client = $this->initClient($url);
      // $filter = ['Field' => 'Product_Group_Code', 'Criteria' => $product_code];
      $result = $client->ReadMultiple(['filter' => [], 'setSize' => 100]);
      return $result;
    }catch (Exception $e) {
        echo $e->getMessage();
    }
  }

This is how I get records from Ms dynamics Nav. All the results are based on the English Language. I need to figure out how we can get records based on other languages like De. Thanks in Advance.

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
Aravind Srinivas
  • 320
  • 3
  • 11
  • I think the only way to do it is on Nav side. You need to switch language in settings of web-services’s instance. – Mak Sim Feb 15 '18 at 13:21
  • Is there any alternate solution via API. @MakSim – Aravind Srinivas Feb 16 '18 at 04:26
  • What exactly are you willing to see in other language? Amounts? – Mak Sim Feb 16 '18 at 07:26
  • ...Also note that Product Groups don't have translations/multi-language description values, unlike Items (See table35 - Item Translations). – ian_scho Feb 16 '18 at 11:28
  • @MakSim Each product has specifications,short description,name which are different for the same product with change in language. for Eg : product name in English : Classic Polo Shirt in De : Capak Polio Like wise – Aravind Srinivas Feb 16 '18 at 11:57
  • @ian_scho I mentioned product group as just one example my motive is to get the data based on language. – Aravind Srinivas Feb 16 '18 at 11:59
  • What ian_scho is trying to explain to you is that item description is special rare case when you do have translations and translations are stored in the separate table. To access it you don’t need to change language. You need to publish page corresponding to table 35 and read it with filter by language. – Mak Sim Feb 16 '18 at 19:42
  • See @MakSim we can apply the filter on only those which are listed. For eg: en - classic de - calsso If the response is like this then we can filter them based on language. Here i am only receiving response from One language. – Aravind Srinivas Feb 17 '18 at 05:03
  • 1
    Then you need to create several Nav instances dedicated for each language you want to query. Url will be like “https://whatever.azure.com:7047/NAV_EN/WS/CRONUS” or “https://whatever.azure.com:7047/NAV_DE/WS/CRONUS”. Alternatively you can separate them by port number. – Mak Sim Feb 17 '18 at 13:23
  • Ok thanks, bro let me check with the Nav developer regarding the same. – Aravind Srinivas Feb 23 '18 at 05:23

1 Answers1

1

By default, NAV web services are set up to work in en-US culture - that is, English language for multilanguage captions and US format for dates (02/16/18) and decimal amounts (23.37).

There are several ways to influence this behavior:


First, there is a block of related parameters in NAV Server configuration - Services Default Company, Services Default Time Zone etc: https://msdn.microsoft.com/en-us/library/dd355055(v=nav.90).aspx#General

You need the parameter "Services Language", which allows to select the culture used by NAV web services to process requests.

This configuration is static, but you can create several NAV service endpoints to have different configurations and switch between them.


Second, it is possible to setup NAV to process requests of different users using a culture specified in the NAV setup for this user. It is described in more detail in the following blog post: https://blogs.msdn.microsoft.com/nav/2015/03/26/culture-settings-on-nav-web-services/

Using this feature, it is possible either to use different users to get different language/culture, or to change the culture of a current user by separate request to NAV.

sergeyol
  • 701
  • 3
  • 10
  • https://inviqa-msnav.northeurope.cloudapp.azure.com:7047/NAV/WS/CRONUS UK Ltd/Page/Item This is an example of how we call Soap normally. Can you share a similar example with language parameter? Thanks in advance. – Aravind Srinivas Feb 16 '18 at 12:09