My Products
Help
Florian Haase
PARTNER

PostCode validation and API Reponse

by Florian Haase

Hi

 

I had just a case in a Norwegian Visma.Net client. There was registered one customer with country "Netherland" and a wrong postcode. Our integration registered an order by API and got following reponse (here from swagger):

 

{"message": "VismaId: 7f85e754-bfb8-4eff-a339-453c3f99984a. Object reference not set to an instance of an object."}

 

in the userinterface:

 

Det oppsto en feil under behandling av feltet Postnr. verdi 8861 Feil: Postnr. følger ikke reglene for valgte land.

 

Could the error-handling in the API be improved here?

 

Florian

3 REPLIES 3
Yıldırım
VISMA

by Yıldırım (Updated ‎06-04-2022 16:36 by Yıldırım VISMA )

Hi, 

JSON, Print screens etc. that contains sensitive information can be sent to developersupport@visma.com

 

We'll try to configure the same setup as you have in the integration company to reproduce the issue so that this can be addressed, therefore please send us the settings of the Customer / Company when you've received the error. 

 

1) What are the enabled validations ? Countries/counties/postcodes (ScreenID=CS20400S)

  • Address 1 : ? 
  • Postcode : ✔️
  • City: ?
  • Email : ?

1.1) Please specify in the email if any "Postcode & City" defined and one of them used in the  "Customer" card that you got error when the validation was active.

Countries_counties_postcodes.jpg

 

2) Customer Card Financials ERP UI
 (Send us a print screen for each tab following where we can clearly see the fields)  

  • General information > Main address
  • Invoicing settings > Invoice address
  • Delivery settings > Shipping address

3) Include used POST Sales Order JSON

 

Thanks.

Yıldırım
VISMA

by Yıldırım

Hello, 

 

1) What are validations are currently active ? Is "postCode"validation active for "Netherlands" in Financials ERP <ScreenId=CS20400S> ? 

Window.png

 

2) To confirm, do you receive the following error message while creating a SalesOrder in the UI ? 

 

"Det oppsto en feil under behandling av feltet Postnr. verdi 8861 Feil: Postnr. følger ikke reglene for valgte land."

 

 

3) Have you tried correcting the value <Postcode> in the Customer Card ?  This seems to be related to ERP Value check that has been mentioned earlier in County-Number problem

 

4) Please attach the used POST JSON. 

 

Thanks.

Florian Haase
PARTNER

by Florian Haase

Hi

 

1) The case is closed by deactivating the postcode validation.

2) Yes UI reports the correct errormessage, but the API reports 

Object reference not set to an instance of an object

3) No we did not, because its the integrated solution which is owner of the customerdata (and the postcodes). Its no point to correct the customerdata in VNet because it will be overwritten again by the pre-system.

4) The Post-Json does not contain anything other relevant than the customer-number on the order-header. (no point to send the details from the customer here to everybody)

 

Florian