<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged workflow</title>
<link>https://overflow.efficy.io/?qa=tag/workflow</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to reset user (using SetUsers true) except resources.</title>
<link>https://overflow.efficy.io/?qa=6356/how-to-reset-user-using-setusers-true-except-resources</link>
<description>&lt;p&gt;I want to reset users into the workflow but I need to keep all users like resources.&lt;br&gt;
Is there a quick way to do that with an Efficy function ?&lt;/p&gt;

&lt;p&gt;My only alternative way is to check user before reset, identify the ressources and add them into my varArrayOf users I want to set.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6356/how-to-reset-user-using-setusers-true-except-resources</guid>
<pubDate>Tue, 16 Nov 2021 13:02:32 +0000</pubDate>
</item>
<item>
<title>Call EditInitializedPackProd on edit and on add</title>
<link>https://overflow.efficy.io/?qa=6205/call-editinitializedpackprod-on-edit-and-on-add</link>
<description>&lt;p&gt;Hello&lt;/p&gt;

&lt;p&gt;When you edit an existing pack_prod relation by pressing 'Edit relation' on a product in a package, the function EditInitializedPackProd is called. When a new product is added and a product is selected that already has a relation with the package, the same EditInitializedPackProd function is called.&lt;/p&gt;

&lt;p&gt;Is there a way to know if the function is called from the editRelation button or via the addProduct button?&lt;/p&gt;

&lt;p&gt;Right now, the function has 2 parameters EditHandle and Inserted. Inserted returns false in both cases, so this is not the solution I was hoping for.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6205/call-editinitializedpackprod-on-edit-and-on-add</guid>
<pubDate>Tue, 29 Jun 2021 12:55:22 +0000</pubDate>
</item>
<item>
<title>duplicate document in workflow</title>
<link>https://overflow.efficy.io/?qa=6153/duplicate-document-in-workflow</link>
<description>&lt;p&gt;Hello&lt;/p&gt;

&lt;p&gt;When a document is duplicated, a couple of values are overwritten to the default values because of the function 'EditInitializedDocu' in the workflow.&lt;/p&gt;

&lt;p&gt;I want to put these lines of code in an if else clause, so the default values are not set when the document is a duplicate from another.&lt;br&gt;
 Is there a way to know if a document is a duplicate in the workflowfunction 'EditInitializedDocu'?&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6153/duplicate-document-in-workflow</guid>
<pubDate>Mon, 07 Jun 2021 10:20:36 +0000</pubDate>
</item>
<item>
<title>Duplication Merge Workflow?</title>
<link>https://overflow.efficy.io/?qa=6106/duplication-merge-workflow</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm trying to execute a script in the workflow trigger PrepareDuplicateMerge but this trigger is called 2 times : &lt;br&gt;
 - once when the page of Duplication is loaded&lt;br&gt;
 - and when we validate our choice to merge&lt;/p&gt;

&lt;p&gt;What i need is to execute only the script when the user submit his choice to merge, could you help me please?&lt;/p&gt;

&lt;p&gt;Thanks&lt;br&gt;
Version : Efficy 11.2&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6106/duplication-merge-workflow</guid>
<pubDate>Wed, 19 May 2021 12:01:12 +0000</pubDate>
</item>
<item>
<title>Break from BeforeCommit</title>
<link>https://overflow.efficy.io/?qa=6104/break-from-beforecommit</link>
<description>&lt;p&gt;Hello&lt;/p&gt;

&lt;p&gt;I'm trying to break out of the BeforeCommitCase so AfterCommit is never called, if waiting is a certain value and another field is empty. I tried throwing a new error and returning, but it doesn't seem to work. &lt;/p&gt;

&lt;p&gt;Is there a way to not call AfterCommitCase after BeforeCommitCase?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function AfterCommitCase(EditHandle, Inserted) {
    CheckEntitySecurity(EditHandle, Inserted, 'Case') 
}
function BeforeCommitCase(EditCase, Inserted) {
        var dsCase = Database.GetMasterDataSet(EditCase, 0);
        dsCase.Edit
        var waiting = dsCase.FieldByName('WAITINGFOR').AsString
        var jira = dsCase.FieldByName('F_REMARK').AsString
        try {
           if(waiting == 3 &amp;amp;&amp;amp; (jira == &quot;&quot; || jira == null)) {
                throw new Error(&quot;Please fill in the JIRA-task&quot;)
            }
        }
        catch (ex) {
            EfficyJavaAlert(ex);
           return;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6104/break-from-beforecommit</guid>
<pubDate>Tue, 18 May 2021 13:21:08 +0000</pubDate>
</item>
<item>
<title>Delete WrkAlloc function in workflow</title>
<link>https://overflow.efficy.io/?qa=6079/delete-wrkalloc-function-in-workflow</link>
<description>&lt;p&gt;Hello&lt;/p&gt;

&lt;p&gt;I'm trying to add a custom code to our Efficy workflow regarding the allocations in the new project module.&lt;/p&gt;

&lt;p&gt;I managed to do something when the allocation is being placed, but I would like to reverse that actions when an allocation is deleted.&lt;/p&gt;

&lt;p&gt;When an allocation is being placed, the function AfterCommitWrkAlloc works perfectly fine. On deleting, I can't seem to manage to find the right function for the deletion; both onDeleteWrkAlloc(EditHandle, Key) &amp;amp; onBeforeDeleteWrkAlloc(EditHandle, Key) don't seem to work. The function is not called when I debug.&lt;/p&gt;

&lt;p&gt;What function should I call when to do something before the allocation is deleted?&lt;/p&gt;

&lt;p&gt;Thank you in advance!&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6079/delete-wrkalloc-function-in-workflow</guid>
<pubDate>Tue, 11 May 2021 13:31:35 +0000</pubDate>
</item>
<item>
<title>getLookupValueFromKey</title>
<link>https://overflow.efficy.io/?qa=5436/getlookupvaluefromkey</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;In workflow script i need to read value from lookup record.&lt;br&gt;
To do that, i used function API getLookupValueFromKey. &lt;br&gt;
Thus the code is : &lt;br&gt;
var labelTypeRelation = Efficy.getLookupValueFromKey(Efficy.entityCatalog.tableIDFromName('LK&lt;em&gt;RELATION&lt;/em&gt;PRJR&lt;em&gt;COMP'), 'F&lt;/em&gt;RELATION&lt;em&gt;PRJR&lt;/em&gt;COMP', CompDataSet.fieldByName('F&lt;em&gt;TYPE&lt;/em&gt;RELATION').asFloat);&lt;/p&gt;

&lt;p&gt;But when i run script, i get this error message :&lt;br&gt;
Cannot fetch Lookup Table Values on table &quot;LK&lt;em&gt;RELATION&lt;/em&gt;PRJR&lt;em&gt;COMP.F&lt;/em&gt;RELATION&lt;em&gt;PRJR&lt;/em&gt;COMP&quot;&lt;/p&gt;

&lt;h2&gt;ErrorContext&lt;/h2&gt;

&lt;p&gt;EEfficyLookupTableError 1806&lt;br&gt;
(ENTT-1515) LookupTableManager&lt;br&gt;
FieldName &quot;0&quot; not found in SYS_FIELDS&lt;/p&gt;

&lt;h2&gt;Error&lt;/h2&gt;

&lt;p&gt;EEfficyLookupTableError 1805&lt;br&gt;
(ENTT-1512) LookupTableManager&lt;br&gt;
Cannot fetch Lookup Table Values on table &quot;LK&lt;em&gt;RELATION&lt;/em&gt;PRJR&lt;em&gt;COMP.F&lt;/em&gt;RELATION&lt;em&gt;PRJR&lt;/em&gt;COMP&quot;&lt;/p&gt;

&lt;h2&gt;Error&lt;/h2&gt;

&lt;p&gt;I managed to find solution with query sql but i would like to use Efficy API.&lt;/p&gt;

&lt;p&gt;Can you help me ?&lt;/p&gt;

&lt;p&gt;Best regards,&lt;/p&gt;

&lt;p&gt;Romain&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5436/getlookupvaluefromkey</guid>
<pubDate>Thu, 02 Jul 2020 12:37:06 +0000</pubDate>
</item>
<item>
<title>Efficy.copyDetails and workflow</title>
<link>https://overflow.efficy.io/?qa=5450/efficy-copydetails-and-workflow</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I wanted to know if the workflow is triggered when the function Efficy.copyDetails is used.&lt;/p&gt;

&lt;p&gt;I combined two components :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A project team guide developed by Kristof logs every workflow trigger : &lt;a rel=&quot;nofollow&quot; href=&quot;https://help.efficy.io/edn/projectguides/workflow_events&quot;&gt;https://help.efficy.io/edn/projectguides/workflow_events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A simple scheduler script :&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;Create a new action with an user and a company.&lt;/li&gt;
&lt;li&gt;Create a new action based on the first one with the Efficy.copyDetails function and the following details : ntUser and ntComp.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I confirm that the workflow is not triggered when this function is used.&lt;br&gt;
&lt;strong&gt;What are the motivations ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If it's ok to not trigger the workflow, it should be great to add a comment (or a symbol) in the documentation.&lt;/p&gt;

&lt;p&gt;Kr,&lt;/p&gt;

&lt;p&gt;Eric&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5450/efficy-copydetails-and-workflow</guid>
<pubDate>Mon, 25 May 2020 07:03:34 +0000</pubDate>
</item>
<item>
<title>datasynchro et activation workflow</title>
<link>https://overflow.efficy.io/?qa=5346/datasynchro-et-activation-workflow</link>
<description>&lt;p&gt;Bonjour,&lt;/p&gt;

&lt;p&gt;Lors d'une DataSynchro, si on active le workflow, le script tourne en boucle sans envoyer de message d'erreur. &lt;br&gt;
Nous avons remarqué que si le code du workflow est écrit directement dans la fenêtre du designer, ce problème n'apparaît pas. Or, depuis la migration en 11.3, nous avons mis en place le workflow par un import de fichier comme conseillé dans la documentation.&lt;br&gt;
Dans le designer nous avons le code suivant : &lt;br&gt;
/*&lt;br&gt;
@import &quot;custom/workflow/workflow&quot;&lt;br&gt;
*/&lt;/p&gt;

&lt;p&gt;Comment faire pour que le DataSynchro fonctionne en maintenant le système d'import de fichier du workflow ?&lt;/p&gt;

&lt;p&gt;Merci&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5346/datasynchro-et-activation-workflow</guid>
<pubDate>Tue, 03 Mar 2020 09:21:02 +0000</pubDate>
</item>
<item>
<title>Is it possible to customize the error page thrown from workflow</title>
<link>https://overflow.efficy.io/?qa=5063/is-it-possible-customize-the-error-page-thrown-from-workflow</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I was wondering if it is possible to customize or adapt slightly the error page in case you throw an error from the workflow?&lt;/p&gt;

&lt;p&gt;If we take the example under here, would it be possible to :&lt;br&gt;
 - format the text shown (in this case &quot;lala&quot;), for example put the text in bold. I haven't been able to do this&lt;br&gt;
 - Modify the error title, in this case &quot;Onverwachte fout&quot;&lt;/p&gt;

&lt;p&gt;Code in workflow : throw new Error(&quot;lala&quot;);&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=10736764977486878326&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;Thank you,&lt;br&gt;
Ken&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5063/is-it-possible-customize-the-error-page-thrown-from-workflow</guid>
<pubDate>Thu, 21 Nov 2019 14:15:14 +0000</pubDate>
</item>
<item>
<title>workflow event: OnBeforeDeleteProj not working</title>
<link>https://overflow.efficy.io/?qa=5051/workflow-event-onbeforedeleteproj-not-working</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm currently customizing the last build of efficy: 11.3.19429.0&lt;br&gt;
I used a function that is supposed to trigger before deleting a project, that&lt;br&gt;
is called &quot;OnBeforeDeleteProj&quot;, I've put a debugger in it but it doesn't seem&lt;br&gt;
to be taken into account. The debugger doesn't trigger here is the code part in the workflow:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function OnBeforeDeleteProj(key) {
    debugger;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I've disconnected &amp;amp; reconnected / tried to delete from consult &amp;amp; edit context but the event still doesn't work.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5051/workflow-event-onbeforedeleteproj-not-working</guid>
<pubDate>Tue, 19 Nov 2019 10:08:47 +0000</pubDate>
</item>
<item>
<title>Unable to launch custom page from workflow</title>
<link>https://overflow.efficy.io/?qa=4990/unable-to-launch-custom-page-from-workflow</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;After an upgrade from 10SP2 to 11.2, i am experiencing issues with the workflow of a client.&lt;/p&gt;

&lt;p&gt;Triggered by BeforeCommitCont, the following command was to be executed : UserSession.ExecuteCommand(&quot;displayCustomActions('{0}', '{1}', '{2}', '{3}');&quot;.format(entity, key, (addrChangeInfo) ? JSON.stringify(addrChangeInfo) : null, true)))&lt;/p&gt;

&lt;p&gt;Since the upgrade, this doesn't seem to work. We are still able to use this functionality to trigger an alert, but launching a function defined in custom.js doesn't seem to work anymore.&lt;/p&gt;

&lt;p&gt;This function is used to launch an custom page that shows possible links based on the addrChangeInfo parameter. There is quite a lot of functionality behind this to populate this parameter and also to determine if the pop-up should be showed. So the fastest way to resolve this would be to keep the current functionality (by making custom.js available again in the workflow?).&lt;/p&gt;

&lt;p&gt;If that isn't possible, what scenario could be used to copy this behavior? I tried with storing the addrChangeInfo in the database and to launch the function in front-end, but i am unable to trigger this between BeforeCommit and AfterCommit.&lt;/p&gt;

&lt;p&gt;Any ideas on how to solve this? Any other examples that you know of?&lt;br&gt;
Let me know if you need more information.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br&gt;
Ken&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4990/unable-to-launch-custom-page-from-workflow</guid>
<pubDate>Tue, 05 Nov 2019 13:13:22 +0000</pubDate>
</item>
<item>
<title>How can I generate .PDF from .DOCX attachment in workflow?</title>
<link>https://overflow.efficy.io/?qa=4682/how-can-i-generate-pdf-from-docx-attachment-in-workflow</link>
<description>&lt;p&gt;We want a related .PDF attachment for each .DOCX template generated invoice.&lt;br&gt;
Can we do this in workflow/serverscript?&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4682/how-can-i-generate-pdf-from-docx-attachment-in-workflow</guid>
<pubDate>Mon, 12 Aug 2019 12:05:12 +0000</pubDate>
</item>
<item>
<title>No RelationKey (optional) parameter for OnInsertDetailXxxxYyyy event</title>
<link>https://overflow.efficy.io/?qa=4629/relationkey-optional-parameter-oninsertdetailxxxxyyyy</link>
<description>&lt;p&gt;When scripting the OnInsertDetail event, we're not provided the (optional) relationKey parameter.&lt;br&gt;
Consequently, it becomes a nightmare when you want to edit the newly inserted detail relation : I hoped the new detail would be the last one in the detailDataset but its position is not reliable.&lt;/p&gt;

&lt;p&gt;This is to my mind a decent change request.&lt;/p&gt;

&lt;p&gt;I've tried set the SELECTORDERBY clause of the SYS&lt;em&gt;TABLEVIEWS to XXXX&lt;/em&gt;YYYY.D_CHANGE, but this isn't reliable.&lt;br&gt;
=&amp;gt; I use a custom fied to know if a detail has been processed or not by my workflow :-(&lt;/p&gt;

&lt;p&gt;Any comment is welcome.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4629/relationkey-optional-parameter-oninsertdetailxxxxyyyy</guid>
<pubDate>Wed, 31 Jul 2019 09:45:55 +0000</pubDate>
</item>
<item>
<title>How to implement a workflow to manage holidays requests and approval process?</title>
<link>https://overflow.efficy.io/?qa=4478/implement-workflow-manage-holidays-requests-approval-process</link>
<description>&lt;p&gt;Approval process: 2 levels&lt;br&gt;
1/ approval at project level &lt;br&gt;
2/ approval at admin level depending on remaining holidays days for the user&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4478/implement-workflow-manage-holidays-requests-approval-process</guid>
<pubDate>Wed, 19 Jun 2019 11:21:48 +0000</pubDate>
</item>
<item>
<title>Error with Workflow import : WKFL-2397 - Script imports not allowed in this context</title>
<link>https://overflow.efficy.io/?qa=4466/error-with-workflow-import-script-imports-allowed-context</link>
<description>&lt;p&gt;Hello ,&lt;/p&gt;

&lt;p&gt;I'm actually working on the upgrade of a customer. &lt;br&gt;
And I have some issues with the import directive in the workflow. &lt;/p&gt;

&lt;p&gt;Testing Context : &lt;/p&gt;

&lt;p&gt;I'm using the sample custom provided by R&amp;amp;D.&lt;br&gt;
I've Added a workflow file in it.&lt;br&gt;
(path: C:\inetpub\wwwroot\11.2\customs\sample\efficy\serverjs\workflow)&lt;/p&gt;

&lt;p&gt;in the workflow file I only have the following function : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  function AfterLogon() {
    throw new Error('loaded')
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;in the DB workflow i've added the following lines : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt; /*
 @import &quot;custom/workflow/workflow&quot;
 */
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When I try to login I get the following error : &lt;/p&gt;

&lt;p&gt;WKFL-2397&lt;/p&gt;

&lt;p&gt;Script imports not allowed in this context&lt;/p&gt;

&lt;p&gt;does anyone encountered this issue ? &lt;/p&gt;

&lt;p&gt;it seems to happen only on this database, couldn't reproduce the issue on a standard DB.&lt;/p&gt;

&lt;p&gt;any idea ?&lt;/p&gt;

&lt;p&gt;thanks for your help.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4466/error-with-workflow-import-script-imports-allowed-context</guid>
<pubDate>Fri, 14 Jun 2019 13:55:27 +0000</pubDate>
</item>
<item>
<title>Workflow event when public link is reached / is downloaded</title>
<link>https://overflow.efficy.io/?qa=4236/workflow-event-when-public-link-is-reached-is-downloaded</link>
<description>&lt;p&gt;Hello, &lt;/p&gt;

&lt;p&gt;Let's imagine I create a document and I attach a file to it.&lt;/p&gt;

&lt;p&gt;Then, I generate a &quot;public link&quot; for the document and another &quot;public link&quot; to a file.&lt;/p&gt;

&lt;p&gt;I would like to generate new actions (sending a mail, creating an opportunity, generate actions, ... whatever !) :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When someone consult the document&lt;/li&gt;
&lt;li&gt;When someone download one of the file of the document&lt;/li&gt;
&lt;li&gt;When someone download directly the document (with the second link)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each of theses &quot;actions after&quot; are different. How could I catch the event in a workflow ? In the database where is the information stored ? &lt;/p&gt;

&lt;p&gt;Regards, &lt;/p&gt;

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4236/workflow-event-when-public-link-is-reached-is-downloaded</guid>
<pubDate>Tue, 14 May 2019 21:55:38 +0000</pubDate>
</item>
<item>
<title>Visual Studio 2017 / Just In Time Debugger is not being launched</title>
<link>https://overflow.efficy.io/?qa=3591/visual-studio-2017-just-in-time-debugger-not-being-launched</link>
<description>&lt;p&gt;My just in time debugger isn't launching anymore...&lt;/p&gt;

&lt;p&gt;I tried:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;debugger;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;throw new Error(&quot;Testing&quot;);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In the workflow / serverscript but none of those trigger the Visual Studio debugger.&lt;/p&gt;

&lt;p&gt;What could be the cause?&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3591/visual-studio-2017-just-in-time-debugger-not-being-launched</guid>
<pubDate>Mon, 08 Oct 2018 12:00:23 +0000</pubDate>
</item>
<item>
<title>EFFICY 11 : invalid timestamp</title>
<link>https://overflow.efficy.io/?qa=3197/efficy-11-invalid-timestamp</link>
<description>&lt;p&gt;Hi everyone, &lt;/p&gt;

&lt;p&gt;I found this weird bug during a migration from 10sp2 to efficy 11.&lt;/p&gt;

&lt;p&gt;This code, in a workflow : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;dateReturn = query.fieldByName('actiBegin').AsFloat;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Return : 43201.614583333336.&lt;/p&gt;

&lt;p&gt;As you can see, this in a valid date in delphi, and this is the date I expected : &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=10092917754891026752&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;But, when I try to use it in a date field, I got an error, saying that this is an invalid timestamp : &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=8683816877534534649&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;'622884827.-25975808' is not a valid timestamp&lt;/p&gt;

&lt;p&gt;I had to use this trick in order to use my date : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;dateReturn = Math.round(query.fieldByName('actiBegin').AsFloat*1000000)/1000000 + 0.000001;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Is there something I missed ? &lt;/p&gt;

&lt;p&gt;In Conficy, the field is well defined and there is no &quot;datalength&quot; added in sys_fields. &lt;br&gt;
I use the last build of Efficy 11.&lt;/p&gt;

&lt;p&gt;Thanks, &lt;/p&gt;

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3197/efficy-11-invalid-timestamp</guid>
<pubDate>Sat, 26 May 2018 12:57:38 +0000</pubDate>
</item>
<item>
<title>Workflow doesn't work anymore</title>
<link>https://overflow.efficy.io/?qa=3152/workflow-doesnt-work-anymore</link>
<description>&lt;p&gt;Good morning,&lt;/p&gt;

&lt;p&gt;For yesterday, my workflow doesn't work anymore.&lt;br&gt;
The first lines I have are:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function BeforeCommitCont(editHandle, inserted) {
    throw new Error('Error');
    debugger;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And when I save a contact, nothing happens.&lt;br&gt;
There is no error message on Efficy and Visual Studio (which is currently listening to w3wp.exe) does'nt work neither. I also did a Database.disabledWorkflow = false on a serverscript before posting here and nothing changes.&lt;/p&gt;

&lt;p&gt;I did a new project with a clear workflow: same code above works fine.&lt;/p&gt;

&lt;p&gt;Someone can help me, please ?&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3152/workflow-doesnt-work-anymore</guid>
<pubDate>Wed, 16 May 2018 08:08:16 +0000</pubDate>
</item>
<item>
<title>Permission denied when creatng new folder on network share</title>
<link>https://overflow.efficy.io/?qa=2621/permission-denied-when-creatng-new-folder-on-network-share</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm trying to create some folder structure on network share. Access is ok, and i can create folders manually with no problem from Efficy server.&lt;/p&gt;

&lt;p&gt;I tested this script using SchedulerAdmin, and it works perfectly&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function CreateSubfoldersDE(EditHandle){
    var docuDS = Database.GetMasterDataSet(EditHandle, 0);
    var docuRef = docuDS.FieldByName(&quot;REFERENCE&quot;).AsString;
    var subFolders = Database.GetSysStorageValue(&quot;DeSubFolders&quot;).split(&quot;;&quot;); //Folder1;Folder2;Folder3
    var rootFolder = Database.GetSysStorageValue(&quot;DeRootFolder&quot;);// \\servername\Puplic$\1- Projects\TestEfficyCrmIntegration
    var folderObject = new ActiveXObject(&quot;Scripting.FileSystemObject&quot;);
    var path = rootFolder + &quot;\\&quot; + docuRef;
    if(!folderObject.FolderExists(path)){
        folderObject.CreateFolder (path)
        for(var i = 0 ; i &amp;lt; subFolders.length; i++){
            var subFodlerFullPath = path + &quot;\\&quot; + subFolders[i];
            folderObject.CreateFolder (subFodlerFullPath);
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But when i try to do it from workflow (call the same function on AfterCommitDocu) i go error &quot;Permission Denied&quot; like in teh screenshot, indication to line of first fodler to create &quot;folderObject.CreateFolder (path)&quot;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=12232836409994913310&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;I've doubled check to make sure the user that's running COM+ is the same one that has access to that folder. it's a domain user.&lt;/p&gt;

&lt;p&gt;Please advise.&lt;br&gt;
Thank you in advance for help.&lt;br&gt;
Best Regards.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2621/permission-denied-when-creatng-new-folder-on-network-share</guid>
<pubDate>Mon, 17 Jul 2017 10:39:41 +0000</pubDate>
</item>
<item>
<title>Show alert message from workflow</title>
<link>https://overflow.efficy.io/?qa=2616/show-alert-message-from-workflow</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Is it possible to do alert message from a workflow? i know there's other workaround using Ajax calls and manipulation on MacroEditS, but i want to make use of functionality FieldModified to trigger certain functionality, and after execution i want to show some alert.&lt;/p&gt;

&lt;p&gt;I noticed on some workflows on SVN there's command like UserSession.ExecuteCommand('alert(&quot;Hello World&quot;)'), but not sure if it's related to certain versions of Efficy, because i tried it on 10.2 and 2014 6640 but not working. any ideas?&lt;/p&gt;

&lt;p&gt;Please advise.&lt;/p&gt;

&lt;p&gt;Best Regards.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2616/show-alert-message-from-workflow</guid>
<pubDate>Fri, 14 Jul 2017 09:52:27 +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>Scheduled Workflow Window not able to display UTF-8 Characters</title>
<link>https://overflow.efficy.io/?qa=2547/scheduled-workflow-window-not-able-display-utf-characters</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;I don't want to believe it, but it looks as the Scheduled Workflow window is not able to display non latin characters :-/&lt;/p&gt;

&lt;p&gt;Am I mistaken or is this a bug/feature?&lt;/p&gt;

&lt;p&gt;I am dealing with japanese &amp;amp; chinese contacts ;-)&lt;/p&gt;

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

&lt;p&gt;Tim&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2547/scheduled-workflow-window-not-able-display-utf-characters</guid>
<pubDate>Tue, 13 Jun 2017 09:40:31 +0000</pubDate>
</item>
<item>
<title>Google Geocoding via scheduled workflow</title>
<link>https://overflow.efficy.io/?qa=2513/google-geocoding-via-scheduled-workflow</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;is there already a solution available to do geocoding in (scheduled) workflow?&lt;/p&gt;

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

&lt;p&gt;Tim&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2513/google-geocoding-via-scheduled-workflow</guid>
<pubDate>Wed, 31 May 2017 12:52:00 +0000</pubDate>
</item>
<item>
<title>How to disable the copy of PROJ - COMP links to DOCU - COMP when creating a new document?</title>
<link>https://overflow.efficy.io/?qa=2407/disable-copy-proj-comp-links-docu-comp-when-creating-document</link>
<description>&lt;p&gt;Hi to all,&lt;/p&gt;

&lt;p&gt;My customer doesn't want to keep the links to COMP when he create a DOCUment  from a PROJect...&lt;/p&gt;

&lt;p&gt;What is the best way to disable this standard functionality ? &lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2407/disable-copy-proj-comp-links-docu-comp-when-creating-document</guid>
<pubDate>Tue, 21 Mar 2017 17:14:19 +0000</pubDate>
</item>
<item>
<title>best practice logon controls Custom and DB question</title>
<link>https://overflow.efficy.io/?qa=2288/best-practice-logon-controls-custom-and-db-question</link>
<description>&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;with efficy 10 what would be the cleanest option, to block my users from using a test DB with a PROD custom and a Prod DB with a test Custom?&lt;/p&gt;

&lt;p&gt;I ve several ideas here but what do you recommand me?&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2288/best-practice-logon-controls-custom-and-db-question</guid>
<pubDate>Mon, 13 Feb 2017 17:06:22 +0000</pubDate>
</item>
<item>
<title>Workflow still active for a user even non assigned and not in Everyone group</title>
<link>https://overflow.efficy.io/?qa=2282/workflow-still-active-for-user-even-assigned-everyone-group</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;There's a user that is neither part of &quot;Everyone&quot; group nor has workflow assigned to his profile in Conficy, but even though the workflow is still triggered for him, so what is the reason?&lt;/p&gt;

&lt;p&gt;Best Regards.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2282/workflow-still-active-for-user-even-assigned-everyone-group</guid>
<pubDate>Mon, 13 Feb 2017 12:39:46 +0000</pubDate>
</item>
<item>
<title>How to compare old and new value in a workflow</title>
<link>https://overflow.efficy.io/?qa=2165/how-to-compare-old-and-new-value-in-a-workflow</link>
<description>&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;in Efficy 10 SP1 this is my workflow function &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function BeforeCommitActi(EditHandle, Inserted){
var ds = Database.GetMasterDataSet(EditHandle, 0);

var result = &quot;&quot;;

result = &quot;old : &quot; + Database.OldFieldValue(EditHandle, 0, &quot;DURATION&quot;);
result += &quot; - &quot;;
result += &quot;new : &quot; + ds.FieldByName(&quot;DURATION&quot;).AsString;

throw new Error(result);

}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;after modifying an action duration from 3h to 3h30 my error message only contains the old value : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Message: &quot;old : 10800 - new : 10800&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;How can I access the new one?&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2165/how-to-compare-old-and-new-value-in-a-workflow</guid>
<pubDate>Mon, 09 Jan 2017 09:37:28 +0000</pubDate>
</item>
<item>
<title>How can I know if a category has been deactivated in the edit context ?</title>
<link>https://overflow.efficy.io/?qa=2152/how-can-know-category-has-been-deactivated-the-edit-context</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I need to know if a category has been deactivated in the edit context.&lt;/p&gt;

&lt;p&gt;I try to use the following methods in the WF (beforeCommit) but they don't allow me to know if the category has been deactivated or not in the current context :&lt;br&gt;
- CategoryModified : returns false&lt;br&gt;
- OldCategoryFieldValue : returns an empty string&lt;br&gt;
- GetCategoryDataSet : returns a dataset&lt;br&gt;
- .IsEmpty : returns true&lt;/p&gt;

&lt;p&gt;I wonder if this information is stored in the dataset or if Efficy provides a way to know this ?&lt;/p&gt;

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

&lt;p&gt;Regards,&lt;br&gt;
Pierre.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2152/how-can-know-category-has-been-deactivated-the-edit-context</guid>
<pubDate>Tue, 03 Jan 2017 13:38:15 +0000</pubDate>
</item>
<item>
<title>Error when making rest calls on https</title>
<link>https://overflow.efficy.io/?qa=2135/error-when-making-rest-calls-on-https</link>
<description>&lt;p&gt;Hello everyone, &lt;/p&gt;

&lt;p&gt;For one of my customer (Ingenico) I have to communicate with another api using rest call (Method; POST) to synchronise Efficy's tickets/actions. &lt;/p&gt;

&lt;p&gt;During my first tests, I encountered some errors due to the invalid certificate (It's expired since 2015). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First version:&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;//@Author: PPT: Create HTTP request
function createRequest() {

  return new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
}

function SendCaseToJira(k_case){

                var url = Database.GetSysStorageValue('Jira_ApiUrl') + &quot;update/case/&quot; + k_case;
                var req = createRequest();
                try{         
                                var ret;
                                var OnSuccessFunction = function (args2, _html) {ret=_html;}                                    
                                req.onreadystatechange = function() {
                                  if (req.readyState == 4 &amp;amp;&amp;amp; req.status == 200) {
                                                OnSuccessFunction(&quot;&quot;,req.responseText);
                                  }else
                                                  ret = &quot;not working&quot;;
                                };
                                req.open(&quot;POST&quot;, url, false);
                                req.send();

                                Logger.Write(ret);
                }catch(e){
                                Logger.Write(&quot;Error when notifying Jira: &quot; + e.message);
                }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is the error message that I was getting: &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Error when notifying Jira: Security certificate required to access&lt;br&gt;
  this resource is invalid.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then I found that I could disable certificate check by modifying my code: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second version:&lt;/strong&gt; &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;//@Author: PPT: Create HTTP request
function createRequest() {

  // return new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
  return new ActiveXObject(&quot;Msxml2.ServerXMLHTTP.3.0&quot;);
}

function SendCaseToJira(k_case){

                var url = Database.GetSysStorageValue('Jira_ApiUrl') + &quot;update/case/&quot; + k_case;
                //var url = Database.GetSysStorageValue('Jira_ApiUrl') + &quot;update/&quot;;
                var req = createRequest();
                //Disable the certificat check
                req.setOption(2, 13056);
                try{         
                                var ret;
                                var OnSuccessFunction = function (args2, _html) {ret=_html;}                                    
                                req.onreadystatechange = function() {
                                  if (req.readyState == 4 &amp;amp;&amp;amp; req.status == 200) {
                                                OnSuccessFunction(&quot;&quot;,req.responseText);
                                  }else
                                                  ret = &quot;not working&quot;;
                                };
                                req.open(&quot;POST&quot;, url, false);
                                req.send();

                                Logger.Write(ret);
                                //Logger.Write(&quot;Success notifying Jira: &quot; + response);
                }catch(e){
                                Logger.Write(&quot;Error when notifying Jira: &quot; + e.message);
                }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And now I'm getting the following error: &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Error when notifying Jira: An error occurred in the secure channel&lt;br&gt;
  support&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Have someone ever had that kind of problem? Can someone help me on how to generate rest call over https using javascript serverside? &lt;/p&gt;

&lt;p&gt;Thanks in advance. &lt;/p&gt;

&lt;p&gt;KR, &lt;/p&gt;

&lt;p&gt;Prince.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2135/error-when-making-rest-calls-on-https</guid>
<pubDate>Wed, 21 Dec 2016 12:31:30 +0000</pubDate>
</item>
<item>
<title>How do I get the CurrentUserID when creating a case from Outlook ?</title>
<link>https://overflow.efficy.io/?qa=1902/how-do-get-the-currentuserid-when-creating-case-from-outlook</link>
<description>&lt;p&gt;Hi everyone! &lt;/p&gt;

&lt;p&gt;At EasyCash they have created a new custom field &quot;Department&quot; which is mandatory. &lt;br&gt;
Then when they tried to save email from Outlook it did not work because that field was not filled in. &lt;br&gt;
I modified the workflow to set the current user's role as the &quot;department&quot;. &lt;br&gt;
My problem is that the department which is set is always the same, for every users. &lt;/p&gt;

&lt;p&gt;After investigation, I found out that when i call the CurrentUser() method, Efficy returns the value zero (0), but only when the email comes from Outlook. So i can not get the right K_ROLE. &lt;/p&gt;

&lt;p&gt;So my question is: &quot;How do I get the ID of the user which create that case from Outlook?&quot;&lt;/p&gt;

&lt;p&gt;Thanks, &lt;/p&gt;

&lt;p&gt;Prince&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1902/how-do-get-the-currentuserid-when-creating-case-from-outlook</guid>
<pubDate>Tue, 27 Sep 2016 10:09:13 +0000</pubDate>
</item>
<item>
<title>Workflow : CopyDetails Problem with users</title>
<link>https://overflow.efficy.io/?qa=1732/workflow-copydetails-problem-with-users</link>
<description>&lt;p&gt;Shouldn't the following :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Database.CopyDetails(NewActiContext, TemplateActionContext, [ntComp, ntCont, ntUser], false, false);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Link all the linked users of the source action to the new action ????&lt;br&gt;
I only get one user that is copied... which is weird.&lt;/p&gt;

&lt;p&gt;Anyone who has had this same issue ?&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1732/workflow-copydetails-problem-with-users</guid>
<pubDate>Fri, 24 Jun 2016 12:21:47 +0000</pubDate>
</item>
<item>
<title>System Mail Dispatch: Mails found but not sent</title>
<link>https://overflow.efficy.io/?qa=13/system-mail-dispatch-mails-found-but-not-sent</link>
<description>&lt;p&gt;I am creating a workflow in which e-mails are sent on certain conditions. When I click on &quot;run&quot; in the System Mail Dispatch, the logs display &quot;Mails found: 5, ...0 Mails sent&quot;. How can I solve this problem?&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=13/system-mail-dispatch-mails-found-but-not-sent</guid>
<pubDate>Thu, 18 Sep 2014 15:39:16 +0000</pubDate>
</item>
</channel>
</rss>