<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged oppo</title>
<link>https://overflow.efficy.io/?qa=tag/oppo</link>
<description>Powered by Question2Answer</description>
<item>
<title>Efficy addins : Convert Mail to Oppo (Detail not exist in EditContext)</title>
<link>https://overflow.efficy.io/?qa=3989/efficy-addins-convert-mail-oppo-detail-not-exist-editcontext</link>
<description>&lt;p&gt;Geoffrey Deldique, ‎3‎/‎11‎/‎2015‎ ‎15‎:‎56‎:‎42&lt;/p&gt;

&lt;p&gt;I changed the SYS_ENTITYVIEWS (Name : OppoEdit) and added &lt;strong&gt;Oppo_Mail=Mail&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;OLD STRING :&lt;br&gt;
Oppo;Oppo&lt;em&gt;User=User;Oppo&lt;/em&gt;Comp=Comp;Oppo&lt;em&gt;Cont=Cont;Oppo&lt;/em&gt;Proj=Proj;Prod&lt;em&gt;Oppo=Prod;Oppo&lt;/em&gt;Acti=Acti;Prof_Oppo=Prof;&lt;/p&gt;

&lt;p&gt;NEW STRING :&lt;br&gt;
Oppo;Oppo&lt;em&gt;User=User;Oppo&lt;/em&gt;Comp=Comp;Oppo&lt;em&gt;Cont=Cont;Oppo&lt;/em&gt;Proj=Proj;Prod&lt;em&gt;Oppo=Prod;Oppo&lt;/em&gt;Acti=Acti;Prof_Oppo=Prof;&lt;strong&gt;Oppo_Mail=Mail&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Then I made a DB Upgrade&lt;/p&gt;
</description>
<category>Errors</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3989/efficy-addins-convert-mail-oppo-detail-not-exist-editcontext</guid>
<pubDate>Wed, 27 Feb 2019 14:32:19 +0000</pubDate>
</item>
<item>
<title>Workflow run twice on EditInitilize on converting email to oppo directly from outlook</title>
<link>https://overflow.efficy.io/?qa=2585/workflow-twice-editinitilize-converting-directly-outlook</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm facing a strange behavior on workflow triggering.&lt;/p&gt;

&lt;p&gt;A work flow is triggered on inserting new opportunity to link some standard products by default.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// =================================================================================================
//                  VARIABLES
// =================================================================================================



var LK_PROD_FAMILY_STANDARD = 1;

var OPPO_CREATE_DATE_FIELD = &quot;F_CREATE_DATE&quot;;
//var PROJ_CREATE_DATE_FIELD = &quot;D_START&quot;;
var OPPO_LEAD_REF = 2;
//var PROJ_LEAD_REF = 3;
var SHARES_OPTION_DIG = 1;
var SHARES_OPTION_DOVESCO = 2;

// =================================================================================================
//                  TRIGGERS
// =================================================================================================

//On Edit Initilize

function EditInitializedOppo(EditHandle, Inserted) {
    if(Inserted){
        SetCreateDate(EditHandle, OPPO_CREATE_DATE_FIELD);
        LinkStdProducts(EditHandle);
    }
}


// MAIN COMMITS

function BeforeCommitOppo(EditHandle, Inserted) {
    if(Inserted){
        SetReference(EditHandle, OPPO_LEAD_REF);
    }
}

/*function BeforeCommitProj(EditHandle, Inserted) {
    if(Inserted){
        SetReference(EditHandle, PROJ_LEAD_REF);
    }
}*/

function AfterCommitOppo(EditHandle, Inserted) {
    SetCustomReference(EditHandle, Inserted, 'F_SHARE');
}


// =================================================================================================
//                  FUNCTIONS
// =================================================================================================
//AAL: Link all products with family category &quot;Standard&quot;
function LinkStdProducts(EditHandle){
    var SQL = &quot;SELECT K_PRODUCT, NAME, F_SORT FROM PRODUCTS WHERE FAMILY =:PARAM1&quot;
    var prodDS = ExecuteQuery(SQL, LK_PROD_FAMILY_STANDARD, 810);
    if(prodDS &amp;amp;&amp;amp; !prodDS.IsEmpty){
        while(!prodDS.Eof){
                Database.InsertDetail(EditHandle, ntProd, prodDS.FieldByName('K_PRODUCT').AsFloat, -1, false);
                Database.UpdateDetailStringField(EditHandle, ntProd, 0, 0, 'NAME', prodDS.FieldByName('NAME').AsString);
                Database.UpdateDetailField(EditHandle, ntProd, 0, 0, 'K_SORT', prodDS.FieldByName('F_SORT').AsFloat);
            prodDS.Next();
        }
    }
}

function SetReference(EditHandle, RefNo) {
    Database.SetReference(EditHandle, RefNo);
}

function SetCreateDate(OppoHandle, Field){
    var dsOppo = Database.GetMasterDataSet(OppoHandle, 0);
    var createDate = new EffiDate();
    createDate.FromJavaDate(new Date());
    dsOppo.Edit;
    dsOppo.FieldByName(Field).AsString = createDate.GetDateStr_Format2();
}

function SetCustomReference(EditHandle, Inserted, Field){
    var DS = Database.GetMasterDataSet(EditHandle, 0);

    var Reference = &quot;&quot; + GetReference(DS.FieldByName(&quot;REFERENCE&quot;).AsString, DS.FieldByName(Field).AsFloat, Inserted);
    if(Reference != &quot;&quot;){
        var PrevSecState = Database.DisableSecurity;
        var PrevWFState = Database.DisableWorkflow;
        Database.DisableWorkflow = true;
        Database.DisableSecurity = true;

        DS.Edit;
        DS.FieldByName(&quot;REFERENCE&quot;).AsString = Reference;
        Database.CommitChanges(EditHandle, false);

        Database.DisableWorkflow = PrevWFState;
        Database.DisableSecurity = PrevSecState;
    }
}

function GetReference(Reference, FieldValue, Inserted) {
    if(Reference &amp;amp;&amp;amp; Reference != &quot;&quot;){
        var oldRef = Reference.split(&quot;-&quot;);
        var share = &quot;&quot;;
        switch (FieldValue){
            case SHARES_OPTION_DIG:
                share = &quot;DIG&quot;;
                break;
            case SHARES_OPTION_DOVESCO:
                share = &quot;DOVESCO&quot;;
                break;
        }

        var newRef = [];
        newRef.push(oldRef[0]);
        newRef.push(share);
        if(Inserted){//X-YYYY-nnnnn
            newRef.push(oldRef[1]);
            newRef.push(oldRef[2]);
        }
        else{//X-DIG/DOVESCO-YYYY-nnnnn
            newRef.push(oldRef[2]);
            newRef.push(oldRef[3]);
        }
        return newRef.join(&quot;-&quot;);
    }
    return &quot;&quot;;
}

function ExecuteQuery(SQL, QueryParams, storeID) {
    var QueryHandle = 0;
    var ContextHandle = Database.OpenTemporaryContext;
    Result = Database.ExecuteSystemSQLQuery(QueryHandle, ContextHandle, SQL, QueryParams, true, true, storeID);
    return Result;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When i create new opportunity in Efficy, it's working perfectly. Even when i convert some project or email in Efficy is also ok.&lt;/p&gt;

&lt;p&gt;Only when using outlook add-in to convert email directly to opportunity then the products are linked twice. In queryLog the query to get the products to link is run twice when converting email to opportunity from outlook.&lt;/p&gt;

&lt;p&gt;I made test to disable the call for the function, then the products are not linked at all in any case.&lt;/p&gt;

&lt;p&gt;So basically for some reason the trigger is run twice (even Inserted flag is checked) when converting email to oppo fro outlook. So Any idea why?&lt;/p&gt;

&lt;p&gt;Please advice and thank you in-advance for your help.&lt;/p&gt;

&lt;p&gt;Best Regards.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2585/workflow-twice-editinitilize-converting-directly-outlook</guid>
<pubDate>Thu, 29 Jun 2017 08:49:17 +0000</pubDate>
</item>
<item>
<title>How prevent multiple lists in Oppo list</title>
<link>https://overflow.efficy.io/?qa=2061/how-prevent-multiple-lists-in-oppo-list</link>
<description>&lt;p&gt;Into the version 10 release 7987 we have a bug when opening the opportunity list the you change for selection then back to opportunity list. The previous list appear after the first list.&lt;/p&gt;

&lt;p&gt;have you any patch for this version ? &lt;/p&gt;
</description>
<category>Errors</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2061/how-prevent-multiple-lists-in-oppo-list</guid>
<pubDate>Thu, 01 Dec 2016 15:55:34 +0000</pubDate>
</item>
<item>
<title>Duplicates in OPPO list</title>
<link>https://overflow.efficy.io/?qa=1215/duplicates-in-oppo-list</link>
<description>&lt;p&gt;in Efficy 6640 i have a problem when showing the oppo's of &quot;Everyone&quot;&lt;/p&gt;

&lt;p&gt;It shows records twice when more than on user is linked to an OPPO.&lt;/p&gt;

&lt;p&gt;( 2 users linked --&amp;gt; 2 lines in the Oppo Iist, 3 users -&amp;gt; 3 lines and so on... )&lt;/p&gt;

&lt;p&gt;How can I change this that every Oppo is only shown once ?&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1215/duplicates-in-oppo-list</guid>
<pubDate>Mon, 18 Jan 2016 09:15:36 +0000</pubDate>
</item>
<item>
<title>How to add agenda tab in Efficy 2014 oppo manager</title>
<link>https://overflow.efficy.io/?qa=337/how-to-add-agenda-tab-in-efficy-2014-oppo-manager</link>
<description>&lt;p&gt;Hi,&lt;br&gt;
In Efficy 2012 I have added a tab in Oppo manager showing the agenda for a specifique group.&lt;/p&gt;

&lt;p&gt;Creating a new appointment from there automatically linked it to the displayed Oppo.&lt;/p&gt;

&lt;p&gt;How can I do that in Efficy 2014?&lt;/p&gt;

&lt;p&gt;Regards&lt;br&gt;
Anne&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=337/how-to-add-agenda-tab-in-efficy-2014-oppo-manager</guid>
<pubDate>Fri, 03 Apr 2015 09:59:00 +0000</pubDate>
</item>
</channel>
</rss>