<div dir="ltr"><div><span id="result_box" class="" lang="en"><span class="">Thanks for your</span> reply <span class="">Allan</span> !<br><br> <span class="">After saving</span> <span class="">for</span> <span class="">the user is not</span> <span class="">a natural thing</span> <span class="">(</span><span>he sees</span> <span class="">an information</span> <span class="">and</span> <span class="">will change</span> <span class="">the recording</span> <span class="">to another).</span><br><br> <span class="">And the</span> <span class="">biggest problem is that</span> <span class="">the field can not</span> <span class="">be marked</span> <span class="">as mandatory</span><br><br> <span class="">That's how</span> <span class="">we are doing today</span><span>,</span> <span class="">reading</span> <span class="">from the database</span> <span class="">and then</span> <span class="">changing</span><span>.</span><br><br> <span class="">But I wanted to</span> <span class="">manipulate</span> <span class="">the on-screen</span> <span class="">variávels</span> <span class="">(</span><span>without reading</span> <span class="">from the database</span><span>)</span> <span class="">in</span> <span class="">which</span> <span class="">data structure</span><span>, you could</span> <span class="">take the data</span> <span class="">that are</span> <span class="">the</span> <span class="">variables</span> <span class="">on the screen?<br><br></span></span></div><span id="result_box" class="" lang="en"><span class="">Thanks!<br></span></span><div><div><div><div><div><br><br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-05 13:15 GMT-03:00 Alan Lord (News) <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05/09/15 16:48, Ranieri wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
I need complete and check some fields before saving a record.<br>
<br>
If I use a workflow only after save right?<br>
</blockquote>
<br></span>
Yes, but you can always update the record after it has been saved. There is no problem with that.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is possible created a workflow ( or another function or code ) for<br>
checking any data before a save record?<br>
<br>
My intention not change a vTiger code ( hard code )<br>
<br>
Example:<br>
<br>
When user put a postal code, i will execute a API to get street name,<br>
city, state, country and put that information at proper field, and set<br>
each field a mandatory.<br>
</blockquote>
<br></span>
You could write an Event Handler and trigger on the vtiger.entity.beforesave event.<br>
<br>
Or, personally, I would write my own Javascript class and custom actions to deal with all this via Ajax so the fields are populated whilst the user sees it happening. You could wrap all this in a custom module and load the Javascript class using a HEADERSCRIPT link type.<br>
<br>
HTH<span class="HOEnZb"><font color="#888888"><br>
<br>
Al<br>
<br>
-- <br>
Libertus Solutions<br>
<a href="http://www.libertus.co.uk" rel="noreferrer" target="_blank">http://www.libertus.co.uk</a><br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</font></span></blockquote></div><br></div>