Web Services και χρώμα/μέγεθος σε γραμμές με πινακοποιημένες ποσότητες.

942 views
Skip to first unread message

dkot...@gmail.com

unread,
Jul 26, 2022, 4:48:42 AM7/26/22
to Softone Developers Network
Καλησπέρα.

Θέλω να καταχωρήσω παραστατικά με χρώμα/μέγεθος από web services αλλά με μία ιδιαιτερότητα: ο συγκεκριμένος τύπος παραστατικού στο Softone δεν έχει χαρακτηριστικά σε γραμμές και έτσι η εισαγωγή ποσοτήτων γίνεται με τις γνωστές τρεις τελείες που ανοίγουν το πινακάκι.

Τώρα αν ο τύπος είχε χαρακτηριστικά σε γραμμές ξέρω την μορφή του JSON που πρέπει να στείλω: θα πρέπει να δηλωθούν τα αντίστοιχα CDIMNO1/ CDIMNO2 στο ITELINES.

Αλλά στην συγκεκριμένη περίπτωση αυτό δεν δουλεύει. Το Softone παραπονιέται ότι δεν έχει καταχωρηθεί κύρια ποσότητα.

Προφανώς αυτό που πρέπει να περάσω δεν είναι ένα σετ χαρακτηριστικών αλλά την πλήρη SOANAL ανάλυση χαρακτηριστικών από το πινακάκι. Το οποίο όμως δεν έχω καταφέρει να βρω με ποια σύνταξη γίνεται.

Υπάρχει κάποιο παράδειγμα σε JSON για το πως ακριβώς μπορώ να κάνω κάτι τέτοιο ; Το έχω ψάξει αρκετά και δεν έχω καταφέρει να το βρω.

Ευχαριστώ.

dkot...@gmail.com

unread,
Jul 26, 2022, 6:50:19 AM7/26/22
to Softone Developers Network
Να συμπληρώσω ότι καλώντας την GetObjectTables στα web services για το SALDOC βλέπω ότι υπάρχει ένας πίνακας VQTYANAL που λογικά είναι σχετικός με αυτό που θέλω να κάνω. Το λέω επειδή καλώντας GetTableFields σε αυτό τον πίνακα βλέπω ότι έχει την ανάλυση των χαρακτηριστικών που θέλω.

Όσο και να προσπαθώ όμως να συντάξω ένα JSON με ITELINES και VQTYANAL  δεν καταφέρνω τίποτα. Πάντα παίρνω ότι δεν έχω συμπληρώσει ποσότητα για την γραμμή.

Liviu Buligan

unread,
Jul 26, 2022, 8:12:04 AM7/26/22
to so...@googlegroups.com
 I remember in a similar situation (in Java Script), after you add values to VQTYANAL it is needed to call an internal function that totalize the color/size qtys and add it to the line QTY. The function is IteLineAnal.SumQAnal, it gets as parameters the MTRLINES id and the name of the field to be totalised , like "QTY1". It should be called with <ObjectName>.EVAL()
Example: PurObj.EVAL('IteLineAnal.SumQAnal('+ITELINES.MTRLINES+',"QTY1")');

It is clear you cannot call a function within JSON, but you can try to trigger the execution of that function with Advanced JS on ITELINES_POST.

Please let us know if it is working!

--
Softone Developers Network group.
To post to this group, send email to so...@googlegroups.com
---
Λάβατε αυτό το μήνυμα επειδή έχετε εγγραφεί στην ομάδα "Softone Developers Network" των Ομάδων Google.
Για να απεγγραφείτε απ' αυτή την ομάδα και να σταματήσετε να λαμβάνετε μηνύματα ηλεκτρονικού ταχυδρομείου απ' αυτή, στείλτε ένα μήνυμα ηλεκτρονικού ταχυδρομείου στη διεύθυνση soft1+un...@googlegroups.com.
Για να κάνετε προβολή αυτής της συζήτησης στον ιστό, επισκεφτείτε τη διεύθυνση https://groups.google.com/d/msgid/soft1/6ac88cd0-92d2-4df9-9ee7-ae8223964563n%40googlegroups.com.


--
Liviu Buligan

dkot...@gmail.com

unread,
Jul 27, 2022, 4:17:32 AM7/27/22
to Softone Developers Network
But will this actually work ? I mean for a post event to trigger something must be posted. Right ? But in my case nothing is actually posted since softone rejects the request as invalid.

I will see if I can manage to make it work. Thanks.

Liviu Buligan

unread,
Jul 27, 2022, 9:13:04 AM7/27/22
to so...@googlegroups.com
To me, it was working. I used it to "copy" a document from purchases to inventory documents.


Για να κάνετε προβολή αυτής της συζήτησης στον ιστό, επισκεφτείτε τη διεύθυνση https://groups.google.com/d/msgid/soft1/c4c32cfd-2e80-49f1-ae6e-a059c5141a61n%40googlegroups.com.


--
Liviu Buligan

Kostas Panouklias

unread,
Jul 28, 2022, 6:14:17 AM7/28/22
to so...@googlegroups.com
Καλησπέρα σας

Εντοπίστηκε πρόβλημα στην συγκεκριμένη περίπτωση και έχει διορθωθεί στην έκδοση 622.6 που θα κυκλοφορήσει άμεσα.

Επισυνάπτω υπόδειγμα json
Προσοχή !   

Υποχρεωτικά 

"ObjectParams": {      
      "NOEVENTS": "1"
  }  

και ITELINES.QTY1 = Σύνολο από τα αντιστοιχα VQTYANAL της γραμμής
 "ITELINES": [
      {
        "LINENUM": "1",
        "MTRL": "6789",
        "MTRLINES": "1",
        "QTY1": "7"        
      }
]
*****************************************************

{
  "AppId": "xxxx",
  "ClientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "Version": 2,
  "Service": "SetData",
  "Object": "SALDOC&list=&form=xxxx",
  "LocateInfo": "ITELINES:FINDOC,LINENUM,MTRL,QTY1;",
  "ObjectParams": {      
      "NOEVENTS": "1"
  },  
  "Data": {
    "MTRDOC": [
      {
        "WHOUSE": "1000"
      }
    ],
    "SALDOC": [
      {
        "SERIES": "7021",
        "APPRV": "1",
        "TRDR": "46"
      }
    ],
    "ITELINES": [
      {
        "LINENUM": "1",
        "MTRL": "6789",
        "MTRLINES": "1",
        "QTY1": "7"        
      }
    ],
    "VQTYANAL": [
      {
        "MTRLINES": "1",
        "CDIMLINES1": "2",
        "CDIMLINES2": "2",
        "CDIMLINES3": "1",
        "QTY1": "5"
      },
      {
        "MTRLINES": "1",
        "CDIMLINES1": "1",
        "CDIMLINES2": "1",
        "CDIMLINES3": "1",
        "QTY1": "2"
      }
    ]
  }
}


Κωνσταντίνος Πανουκλιάς
Soft1 R&D Director
E: p...@softone.gr
T: +30 211 1022222 (2218) F: +30 210 9484094
Αχιλλέως 8 & Λ. Κατσώνη, 176 74 Καλλιθέα
www.softone.gr
facebook linked in twitter youtube

This email and all attachments are confidential and are intended solely for use by the individual to whom this email is addressed unless otherwise noted. If you are not the named addressee you should not use, print, disclose, distribute or copy this e-mail or take any action in reliance on its contents. Any views, opinions and content expressed or contained herein are solely those of the sender and do not necessarily represent SoftOne Technologies S.A. nor conclude any binding agreement on behalf of SoftOne Technologies S.A. | 8 Achilleos & L. Katsoni Str., 176 74, Kallithea



From: so...@googlegroups.com <so...@googlegroups.com> on behalf of Liviu Buligan <liviu....@gmail.com>
Sent: 27 July 2022 16:12
To: so...@googlegroups.com <so...@googlegroups.com>
Subject: Re: Web Services και χρώμα/μέγεθος σε γραμμές με πινακοποιημένες ποσότητες.
 
Για να κάνετε προβολή αυτής της συζήτησης στον ιστό, επισκεφτείτε τη διεύθυνση https://groups.google.com/d/msgid/soft1/CAEzg%3Dx7WRqTgreGkwn98L-mE5KmQFxG7J7rUAB2wgn7WgTGt6A%40mail.gmail.com.

dkot...@gmail.com

unread,
Jul 28, 2022, 6:52:21 AM7/28/22
to Softone Developers Network
Ευχαριστώ.

Η εγκατάσταση είναι στο Azure οπότε θα περιμένω την αναβάθμιση για να το δοκιμάσω.

Liviu Buligan

unread,
Jul 28, 2022, 7:29:48 AM7/28/22
to so...@googlegroups.com
Thank you for the answer. 
Just one question: if we will use "NOEVENTS": "1", all object events will not be triggered? JS code written for on_post, on_table_field etc will still run? Can you please describe if there are other "side effects" if we will use it? 

Thank you,
Liviu

Για να κάνετε προβολή αυτής της συζήτησης στον ιστό, επισκεφτείτε τη διεύθυνση https://groups.google.com/d/msgid/soft1/DB7PR05MB570711CBB920F1D14130F56FD7969%40DB7PR05MB5707.eurprd05.prod.outlook.com.


--
Liviu Buligan

Kostas Panouklias

unread,
Jul 28, 2022, 8:33:08 AM7/28/22
to so...@googlegroups.com
All object events will be triggered 

Κωνσταντίνος Πανουκλιάς
Soft1 R&D Director
E: p...@softone.gr
T: +30 211 1022222 (2218) F: +30 210 9484094
Αχιλλέως 8 & Λ. Κατσώνη, 176 74 Καλλιθέα
www.softone.gr
facebook linked in twitter youtube

This email and all attachments are confidential and are intended solely for use by the individual to whom this email is addressed unless otherwise noted. If you are not the named addressee you should not use, print, disclose, distribute or copy this e-mail or take any action in reliance on its contents. Any views, opinions and content expressed or contained herein are solely those of the sender and do not necessarily represent SoftOne Technologies S.A. nor conclude any binding agreement on behalf of SoftOne Technologies S.A. | 8 Achilleos & L. Katsoni Str., 176 74, Kallithea



Sent: 28 July 2022 14:29
Για να κάνετε προβολή αυτής της συζήτησης στον ιστό, επισκεφτείτε τη διεύθυνση https://groups.google.com/d/msgid/soft1/CAEzg%3Dx6jBEuCc1tRS9MPoP6a_h4U4C5GRdk%2Bicg%2BgBaHDyyVVg%40mail.gmail.com.

MakisCE

unread,
Jul 29, 2022, 9:02:43 AM7/29/22
to Softone Developers Network
Konstantine, did you mean "will not be triggered" ?

"NOEVENTS": "1"     suggests that NO events will be triggered,  as per  Liviu question.

Xarilaos D

unread,
Oct 14, 2022, 7:14:03 AM10/14/22
to Softone Developers Network
Web service requests are not trigger object events by default... right?

if we set

"OBJECTPARAMS": {      
      "NOEVENTS": "0"
  }, 

this means that object events will trigger?

Xarilaos D

unread,
Nov 2, 2022, 9:18:24 AM11/2/22
to Softone Developers Network
Can someone verify the above?

yo9...@gmail.com

unread,
Nov 2, 2022, 3:56:05 PM11/2/22
to Softone Developers Network
hi,
" Web service requests are not trigger object events by default... right? " - no, that's not correct as far as i know. the events are triggered.

if i`m not wrong, the scenario is the following:
using the ws, you are logging in as a soft1 user. if you just call an object, i think you use the default form for that user (the user assigned in web accounts for the web service).
unless you specify a form in which the events are overridden or you have some inherited blank events which overrides the logic in the events, the events are there.
i don`t know the whole hierarchy but you can assign events in sbsl scripts, dll, advanced js ->jsmain and the ones from the form. i know that the ones from the form overrides the ones from jsmain. but i never tested the other ones.

how did you get in this point? is there no other way to keep it more simple?

Xarilaos D

unread,
Nov 3, 2022, 3:01:40 AM11/3/22
to Softone Developers Network
Thank you for the reply.
A friend (Soft1 reseller) he inform me that only script from soft1 (js, sbsl) are trigger from WS and that its not possible to trigger dll code from WS.
One scenario was when a sales document change status to specific values i am sending a viber message. Dll C# in after post is the code. When you change the order status from WS this code is not trigger.
I did not bother further because he had the above information that is not trigger code from WS.
Thank you for your information. I will make some tests again.

Νίκος Μάλιακκας

unread,
Nov 3, 2022, 4:49:39 AM11/3/22
to Softone Developers Network
Events in dll's are overtaken by events in javascript / alerts
So if you have a javascript event on the form you use or an alert on the object or a jsmain code for the event, they will hit (all of them) but not the dll's
Bad thing in c# is that we are used to have multiple event handlers registered for an event and it is a litle frustrating that we don't have them.
For some projects that I wanted an event to fire to both worlds , I used two columns: CCCFROMDLL , CCCTODLL and register events to javascript and to the dll code in order for them to be able to communicate.
You can check if something like that can trigger the event you need.

Xarilaos D

unread,
Nov 3, 2022, 10:27:59 AM11/3/22
to Softone Developers Network
Σε ευχαριστώ Νίκο. Οι πληροφορίες σου ήταν χρήσιμες και κατατοπιστικές.
Reply all
Reply to author
Forward
0 new messages