Re: Assign value to related field
A related field is composed of two fields, one that is stored on db, that is the related id, and other that is used just to display the related record name on screen.
So if your logic_hook is to save a related object, you just have to assign the desired Id to the id field before save it.
If you want to compute some relation before display the record on screen, you have to set values to both fields, the ID, and the textual one.
Rafael Queiroz Gonçalves
Advanced OMG UML Certified Professional
Sun Certified Enterprise Architect for the Java Platform
Sun Certified Programmer for the Java 2 Platform
IBM Certified Advanced Application Developer - Lotus Notes and Domino
IBM Certified Application Developer - IBM WebSphere Portlet Factory
Computer Science Mastering / UFSC - PPGCC
Bookmarks