Difference between revisions of "Get dob Spell method"
From SDU
(New page: __NOTOC__ Category:Customizations Category:r6 Category:r11 Category:r12 Category:Spell Code {{Global Header}} {{Global Announcement}} == Overview == This method loads f...) |
(No difference)
|
Latest revision as of 14:16, 3 June 2011
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.
To discuss or ask questions about this article, select the discussion tab above.
Overview
This method loads from database an object connected over SREL relation to an another object and return it as full DOB object.
This action can be called in spell code in method send_wait for call_attr.
Usage
<source lang="javascript"> void send_wait (int timeout, object top_object, "call_attr", string attr_name, "get_dob") </source>
- timeout - how long (?in seconds?) should the method wait for finishing the method (0 means infinite)
- top_object - object where the attribute is placed
- attr_name - name of SREL attribute
Results
On success attribute DOB object is in the first position of global array msg. <source lang="javascript"> object retval; retval = msg[0]; </source>
Examples
<source lang="javascript"> // Part of code to read request Affected End User send_wait(0, this, "call_attr", "customer", "get_dob"); if (msg_error()) {
logf(ERROR, "%s: error in get_dob(customer): %s", method, msg[0]); return;
} object aff_eu; aff_eu = msg[0]; .... </source>