{"id":26484,"date":"2020-12-26T15:44:43","date_gmt":"2020-12-26T14:44:43","guid":{"rendered":"https:\/\/help.qualiware.it\/qw-help\/?p=26484"},"modified":"2022-12-15T10:38:20","modified_gmt":"2022-12-15T09:38:20","slug":"assegnazione-della-ragione-sociale-di-un-clientefornitore-a-partire-dal-codice-js","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/assegnazione-della-ragione-sociale-di-un-clientefornitore-a-partire-dal-codice-js\/","title":{"rendered":"Assegnazione della ragione sociale di un cliente\/fornitore a partire dal codice (vers. javascript)"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\">\/\/ Il seguente frammento assegna il campo del form \"RAGSOC\" con la ragione sociale \r\n\/\/ del fornitore o cliente il cui codice \u00e8 presente nel campo nel cui EventoCambia viene inserito il frammento stesso\r\n\/\/ ATTENZIONE: la query deve essere autorizzata con la seguente istruzione inserita nell'EventoCaricamento\r\n\/\/ form.GetSession().AllowClientQuery(\"Select RAGSOC from CLIFOR\")\r\n$.QualiWare.executeQuery(\"Select RAGSOC from CLIFOR where CODICE='\"+$('#&lt;TextField1&gt;').getValue()+\"'\",\r\n\t\tfunction(data,error) {\r\n\t\t\tif (error) \r\n\t\t\t\t$.QualiWare.alert(error,\"Errore\")\r\n\t\t\telse \r\n\t\t\t\tif (data.length&gt;0) \r\n\t\t\t\t\t$('#&lt;TextField2&gt;').setValue(data[0][\"RAGSOC\"])\r\n\t\t}\r\n)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ Il seguente frammento assegna il campo del form &#8220;RAGSOC&#8221; con la ragione sociale \/\/ del fornitore o cliente il cui codice \u00e8 presente nel campo nel cui EventoCambia viene inserito il frammento stesso \/\/ ATTENZIONE: la query deve essere autorizzata con la seguente istruzione inserita nell&#8217;EventoCaricamento \/\/ form.GetSession().AllowClientQuery(&#8220;Select RAGSOC from CLIFOR&#8221;) $.QualiWare.executeQuery(&#8220;Select RAGSOC from&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[65],"tags":[88],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/26484"}],"collection":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/comments?post=26484"}],"version-history":[{"count":2,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/26484\/revisions"}],"predecessor-version":[{"id":29742,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/26484\/revisions\/29742"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=26484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=26484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=26484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}