<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged default</title>
<link>https://overflow.efficy.io/?qa=tag/default</link>
<description>Powered by Question2Answer</description>
<item>
<title>Easy default queryviews in Efficy10</title>
<link>https://overflow.efficy.io/?qa=2478/easy-default-queryviews-in-efficy10</link>
<description>&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;in most projects the customers needs some queryviews to be by &quot;default&quot;.&lt;br&gt;
so there is a solution I ve done to help them having control about it : &lt;/p&gt;

&lt;p&gt;in the workflow add the code : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function AfterLogon(){
    initUserOptions();
}

function initUserOptions(){
    //Database.Log(&quot;Ok then&quot;);

    var 
        qh = 0,
        tc = Database.OpenTemporaryContext(),
        sql = &quot;&quot;;

    sql += &quot;select &quot;;
    sql += &quot;    V.K_QUERYVIEW, &quot;;
    sql += &quot;    (select E.NAME from admin.SYS_ENTITIES E where E.K_ENTITY = V.K_MASTER) as MASTER_NAME, &quot;;
    sql += &quot;    (select E.NAME from admin.SYS_ENTITIES E where E.K_ENTITY = V.K_DETAIL) as DETAIL_NAME, &quot;;
    sql += &quot;    (case V.K_DETAIL when -1 then 'Search' else 'Consult' end) as CONTEXT &quot;; 
    sql += &quot;from admin.QUERYVIEWS V &quot;;
    sql += &quot;where V.NAME = 'default' &quot;;

    var ds = Database.ExecuteSystemSQLQuery(qh, tc, sql, &quot;&quot;, true, false, 1);
    ds.First();

    while (!ds.EoF){
        var 
            context = ds.FieldByName(&quot;CONTEXT&quot;).AsString,
            master = ds.FieldByName(&quot;MASTER_NAME&quot;).AsString,
            detail = ds.FieldByName(&quot;DETAIL_NAME&quot;).AsString,
            key = ds.FieldByName(&quot;K_QUERYVIEW&quot;).AsString;

        var section = context + master + &quot;_&quot;;
        section += (context == &quot;Consult&quot;)? detail + &quot;_&quot;: &quot;&quot;;
        section += &quot;QueryView&quot;;

        Database.WriteString(&quot;Efficy&quot;, section, key);

        ds.Next();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The only thing you have to do after that is create a queryview where you want (it works for consult and search context, feel free to make it evolve if you need)&lt;/p&gt;

&lt;p&gt;your query view has to be named : &quot;Default&quot; and be careful that your queryview is linked to everyone.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2478/easy-default-queryviews-in-efficy10</guid>
<pubDate>Wed, 10 May 2017 14:16:53 +0000</pubDate>
</item>
<item>
<title>Default notification settings, where are they stored?</title>
<link>https://overflow.efficy.io/?qa=2069/default-notification-settings-where-are-they-stored</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I would like to know where does default notification settings are stored and if they can be changed in script?&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;

&lt;p&gt;Best Regards.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2069/default-notification-settings-where-are-they-stored</guid>
<pubDate>Mon, 05 Dec 2016 13:56:00 +0000</pubDate>
</item>
</channel>
</rss>