TMACUL

http://www.servicedeskusers.com/Send_WaitCall_attrSync_fetch.

Blog Post created by TMACUL Champion on Jan 1, 2016

Send WaitCall attrSync fetch

 

From SDU

Jump to: navigation, search

 

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.


 

Overview

This method synchronously fetch list of items from SD database. It can be called in Spell Code using send_wait method.

Usage

void send_wait (int timeout, object top_object, "call_attr", string factory_name, "sync_fetch", string rs_type, string query, int unknown, int param_num [, var parameters])
  • timeout - how long (?in seconds?) should the method wait for finishing the method (0 means infinite)
  • top_object - root object for the method (on which the method is called)
  • attr_name - name of attribute on which the action is called
  • factory_name - the factory you want to call against (could be anything like pcat, cnt, cr, alg, ...)
  • query - query determining what record(s) you want to be returned; query is on an Object level (so you can use similar queries used in Stored Queries, Additional Search arguments or bop_odump command)
  • rs_type - the type of recordset you want returned. Should be one of these options:
    • STATIC
    • DYNAMIC
    • MLIST_STATIC
    • MLIST_DYNAMIC
    • RLIST_STATIC
    • RLIST_DYNAMIC
  • unknown - don't know, but usually -1
  • param_num - number of following parameters
  • parameters - variable number of parameters based on given query (for each ? must be exactly one parameter, which value will provide data for corresponding ?)

Results

On success the resulted list is filled into a global array msg as follows:
  • msg[0] - the recordset (object)
  • msg[1] - the length of the recordset (records returned, int)

Examples

// get template by its persistent id send_wait(0, top_object(), "call_attr", "cr_tpl", "sync_fetch", "RLIST_DYNAMIC", "template = ?"-1, 1, cr.persistent_id); // get group by id send_wait(0, top_object(), "call_attr", "grp", "sync_fetch", "RLIST_STATIC", "id = ? AND delete_flag = 0", -1, 1, new_group); // get list of all remote referencies send_wait( 0, top_object(), "call_attr","rrf","sync_fetch", "RLIST_DYNAMIC", "", -1, 0);

Retrieved from "http://www.servicedeskusers.com/Send_WaitCall_attrSync_fetch"

Outcomes