Customizing the executeCommand actions in fcClient
March 19, 2007
In a previous post, I covered how to have fcClient pop a page based on a URL. Now, we'll cover how to customize this functionality to perform your own actions. For this particular example, we'll show how to have an existing fcQuery query get executed and the results posted. 1. In console.asp, we'll add code to get the actual objid of the query based on the query name, for the current user. This is necessary because the query names are not unique across the system. In console.asp, after this existing code: var CommandToExecute = Request("command") + '';var CommandParam1 = Request("param1") + '';var CommandParam2 = Request("param2") + ''; We'll add this: if (CommandToExecute=="executeQuery"){ //get the query objid //first, see if this user ownes this query var gen = FCSession.CreateGeneric('ce_query'); gen.AppendFilter('ce_query2user','=',FCSession.Item('user.id')); gen.AppendFilter('query_name','=',CommandParam1); gen.Query(); if (gen.Count() > 0){ CommandParam1 = gen.Id - 0; }else{ //see…