<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calling Validation Script from an Action Script in Fusion Manage Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852749#M5683</link>
    <description>Hi Tim,&lt;BR /&gt;You cannot call a validation script from an action script. Validations run before action scripts when the user transitions a workflow action. This is where you can return a message to the user if quotes are not set as default. If it passes validation, then the wf action would transition followed by running of an action script lastly. Hope this helps,&lt;BR /&gt;--&lt;BR /&gt;Martin Gasevski | Product Manager | Autodesk PLM 360</description>
    <pubDate>Thu, 08 Oct 2015 16:31:58 GMT</pubDate>
    <dc:creator>gasevsm</dc:creator>
    <dc:date>2015-10-08T16:31:58Z</dc:date>
    <item>
      <title>Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852708#M5682</link>
      <description>&lt;P&gt;As I pointed out&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/plm-360-ideastation/set-quote-as-the-default-from-a-script/idi-p/5850210" target="_blank"&gt;here&lt;/A&gt;, there is no way to set the default quote from a script. &amp;nbsp;Therefore, I would like to send a message to the user letting them know that they need to choose a default quote. &amp;nbsp;A standard Javascript &lt;A href="http://www.w3schools.com/jsref/met_win_alert.asp" target="_blank"&gt;alert&lt;/A&gt; would be completely sufficient for this; however, since that function isn't available, I'm trying to come up with an alternative solution. &amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/plm-360-general-discussion/alert-from-script/m-p/5755135" target="_blank"&gt;This&lt;/A&gt;&amp;nbsp;forum post suggests using a validation script to do this; however, I haven't been able to figure out how to call a validation script from my action script. &amp;nbsp;There might be other ways to get the validation script to run after the action script has finished, but I haven't been able to figure out how to do that yet, and honestly, it seems like a basic necessity of any scripting tool to be able to call one script from another.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 16:16:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852708#M5682</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-08T16:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852749#M5683</link>
      <description>Hi Tim,&lt;BR /&gt;You cannot call a validation script from an action script. Validations run before action scripts when the user transitions a workflow action. This is where you can return a message to the user if quotes are not set as default. If it passes validation, then the wf action would transition followed by running of an action script lastly. Hope this helps,&lt;BR /&gt;--&lt;BR /&gt;Martin Gasevski | Product Manager | Autodesk PLM 360</description>
      <pubDate>Thu, 08 Oct 2015 16:31:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852749#M5683</guid>
      <dc:creator>gasevsm</dc:creator>
      <dc:date>2015-10-08T16:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852765#M5684</link>
      <description>I should add, to set this up : open the workflow editor and edit the wf transition of interest. Then, set the validation script (that checks for nondefault quotes and returns appropriate message to user via returnValue(array[]) and save your changes.</description>
      <pubDate>Thu, 08 Oct 2015 16:36:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852765#M5684</guid>
      <dc:creator>gasevsm</dc:creator>
      <dc:date>2015-10-08T16:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852815#M5685</link>
      <description>So how can I send a message to a user from an action script?</description>
      <pubDate>Thu, 08 Oct 2015 17:01:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852815#M5685</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-08T17:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852847#M5686</link>
      <description>Cannot be done via action script - not sure where you read this is possible. Only validation scripts can send a message array to user effectively interrupting the WF transition request all together.&lt;BR /&gt;--&lt;BR /&gt;Martin Gasevski | Product Manager | Autodesk PLM 360</description>
      <pubDate>Thu, 08 Oct 2015 17:19:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852847#M5686</guid>
      <dc:creator>gasevsm</dc:creator>
      <dc:date>2015-10-08T17:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852972#M5687</link>
      <description>&lt;P&gt;Sorry for not making that clear. &amp;nbsp;I just expected it to be possible, since I've never heard of a situation where a program wasn't able to provide feedback to the user about actions they had performed before. &amp;nbsp;This seems like one of the most basic necessities of any programming language. &amp;nbsp;As I think should be clear from the explanation above, my reasons for needing to do this are unavoidable, as far as I can tell (if anyone knows of a workaround, please let me know). &amp;nbsp;PLM 360's scripting tools do not have the capability to do something that needs to be done for all of a part's pricing information to be included in the BOMs it is included in. &amp;nbsp;Therefore, I really don't want to depend on the user remembering that they need to do this themselves (because they are bound to forget at some point), and I really need to give them some sort of message reminding them that they need to do this (and yes, emailing them a reminder is completely inadequate).&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 18:18:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5852972#M5687</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-08T18:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5854878#M5688</link>
      <description>&lt;P&gt;Hi Tim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your requests are&amp;nbsp;noted, both manipulating default&amp;nbsp;quotes&amp;nbsp;via script and&amp;nbsp;interrupting&amp;nbsp;an action script. Both have been discussed and somewhat&amp;nbsp;specced in past and both are being reviewed in context of future development. Thank you for raising their&amp;nbsp;importance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since&amp;nbsp;neither are planned for near term, I'd like to&amp;nbsp;work together&amp;nbsp;on this for I&amp;nbsp;know the tool is capable today&amp;nbsp;of&amp;nbsp;notifying&amp;nbsp;users of not setting&amp;nbsp;default quote before proceeding.&amp;nbsp;This can be&amp;nbsp;done&amp;nbsp;via&amp;nbsp;Validation script that verify whether&amp;nbsp;your conditions and&amp;nbsp;requirements have been met before allowing a workflow transition to proceed. If&amp;nbsp;this is not met, it has ability to provide UI messagging&amp;nbsp;to end-user for a chance to course correct before attempting&amp;nbsp;again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having said this, kinldy&amp;nbsp;review this documentation on how to go about doing it, and contact me in private so we can&amp;nbsp;implement it together if still are having reservations on proceeeding;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="http://help.autodesk.com/view/PLM/ENU/?guid=GUID-36765D01-C50A-4C64-AFAD-1F71684A8259" target="_self"&gt;Basic Scripting Concepts&lt;/A&gt;&lt;SPAN style="line-height: 15px;"&gt;; please focus on&amp;nbsp;Validation&amp;nbsp;scripts section.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://help.autodesk.com/view/PLM/ENU/?guid=GUID-9A80518C-DFF0-4692-94CE-17A043BDECBE" target="_self"&gt;Creating Validation Script&lt;/A&gt;&lt;SPAN style="line-height: 15px;"&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://help.autodesk.com/view/PLM/ENU/?guid=GUID-E0059095-D1EF-4D85-82E7-96EB74C1AE1E" target="_self"&gt;Setting Validation Script&lt;/A&gt; &lt;SPAN style="line-height: 15px;"&gt;to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="line-height: 15px;"&gt;a giv&lt;/SPAN&gt;&lt;SPAN style="line-height: 15px;"&gt;en&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="line-height: 15px;"&gt;WF Transition.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://help.autodesk.com/cloudhelp/ENU/PLM-360-Scripting/files/GUID-BBBBAB3B-FEAE-4EB7-8D1B-29E76EC6BC65.htm#GUID-BBBBAB3B-FEAE-4EB7-8D1B-29E76EC6BC65__SECTION_4B0EEAE9FC1041338BD3EC8E450E3FFC" target="_self"&gt;Sourcing Tab Scripting Reference,&lt;/A&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;which you already familiar with.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://help.autodesk.com/cloudhelp/ENU/PLM-360-Scripting/files/GUID-362E481D-19F1-413F-B73C-8115E6E604F0.htm#GUID-362E481D-19F1-413F-B73C-8115E6E604F0__SECTION_C525E5FA102E4EFDA0FC0A0F7FAF534F" target="_self"&gt;Validation Script Examples&lt;/A&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;of bubbling up messages to user in the UI.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps and hope to hear from you,&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 17:44:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5854878#M5688</guid>
      <dc:creator>gasevsm</dc:creator>
      <dc:date>2015-10-09T17:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5857563#M5689</link>
      <description>&lt;P&gt;So I just figured out that it actually is possible to run a validation script from an action script. &amp;nbsp;In order to do this, you need to create the workflow as if it were going to be used manually, and then you can use the following to perform the workflow transition automatically:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;item.performWorkflowTransition(transID, 'COMMENTS')&lt;/PRE&gt;&lt;P&gt;See &lt;A href="http://help.autodesk.com/cloudhelp/ENU/PLM-360-Scripting/files/GUID-BBBBAB3B-FEAE-4EB7-8D1B-29E76EC6BC65.htm#GUID-BBBBAB3B-FEAE-4EB7-8D1B-29E76EC6BC65__SECTION_0C60601B44DB4EDF8654C0149F1FBF23" target="_self"&gt;this&lt;/A&gt; help document for more information.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 15:11:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5857563#M5689</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-12T15:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5857591#M5690</link>
      <description>&lt;P&gt;Hi Tim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My recommendation is to&amp;nbsp;use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;item.performWorkflowTransition&lt;STRONG&gt;ByCustomID&lt;/STRONG&gt;('CUSTOM_ID', 'COMMENTS');&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;That way you may reuse the script in production, staging, dev tenants as needed.&amp;nbsp;Simply create a custom ID i.e. user defined alias in the WF Editor for that transition; All sites would use it without&amp;nbsp;worry of constantly&amp;nbsp;updating&amp;nbsp;transition IDs as you update and copy the script&amp;nbsp;around.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The example&amp;nbsp;suggested would work surely, but I'm wasn't&amp;nbsp;sure this is what you had wanted originally. By &amp;nbsp;all means use it, so&amp;nbsp;long as there is awareness&amp;nbsp;that this necessitates another WF state and a transition to it. Possibly semantics, but&amp;nbsp;this isn't quite an action script directly calling validation script and acting on it's outcome. Rather, both the&amp;nbsp;condition script and then the validation scripts of the &lt;EM&gt;&lt;U&gt;next&lt;/U&gt;&lt;/EM&gt;&amp;nbsp;WFTransition (one called via script function) will run independently of&amp;nbsp;current transition's transaction, which would complete once action script runs&amp;nbsp;through to the end.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;HTH,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 15:26:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5857591#M5690</guid>
      <dc:creator>gasevsm</dc:creator>
      <dc:date>2015-10-12T15:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5857661#M5691</link>
      <description>&lt;P&gt;Currently, I have the following workflow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/193995iD34A963BBB763E4C/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Workflow.JPG" title="Workflow.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This may be somewhat simplistic, but I'm assuming that if it gets more complicated than that I will be able to get information about the current workflow state and which transitions are available to it within the script (via such things as&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;item.workflowActions&lt;/FONT&gt;&amp;nbsp;and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;item.workflowItems&lt;/FONT&gt;&lt;/SPAN&gt;) and make a decision from that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point, I don't have the need to pass any information to the validation script, so that shouldn't be a problem. &amp;nbsp;I don't forsee that being a problem in the future either. &amp;nbsp;All the information is in PLM, the scripts just manipulate what's already there.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 16:02:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5857661#M5691</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-12T16:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5857824#M5692</link>
      <description>&lt;P&gt;Actually, upon further investigation, it seems that I can't do what I thought I could with that method. &amp;nbsp;This is because the workflow editor requires that custom IDs be unique (which is reasonable), and the scripting tools do not provide access to the current state of the item (I thought this was provided by &lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;newStep&lt;/FONT&gt; preset parameter, but as it turns out, that parameter is only set in a validation script)&lt;/SPAN&gt;. &amp;nbsp;The result is that the action script doesn't know where it is in the workflow and therefore cannot know which transition to perform.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In light of that, I'm not exactly sure why the method exists in the first place. &amp;nbsp;The only time it would work is if the transition ID were hard coded into the script and the script were only run when the item was in a particular state. &amp;nbsp;If it is run when it is in any other state, an error is produced. &amp;nbsp;The script has no way of confirming that the user is running it when the item is in the correct state, and there is no way to make the action script available in one state. &amp;nbsp;Why provide access to methods without also providing means of getting the information those methods need to run in the first place?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 17:37:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/5857824#M5692</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-12T17:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Validation Script from an Action Script</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/14003795#M8663</link>
      <description>&lt;P&gt;Hi, I’m not sure whether advertising is allowed here, but regarding:&lt;BR /&gt;&lt;EM&gt;"So how can I send a message to a user from an action script?" - "Cannot be done via action script"&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.coolorange.com/" target="_blank" rel="noopener"&gt;coolOrange&lt;/A&gt;&amp;nbsp;has created a tool that makes this possible. If you’re interested, feel free to reach out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2026 09:05:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/calling-validation-script-from-an-action-script/m-p/14003795#M8663</guid>
      <dc:creator>stefan.nairz</dc:creator>
      <dc:date>2026-02-04T09:05:41Z</dc:date>
    </item>
  </channel>
</rss>

