<?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: Unable to get custom property value through Javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185454#M138584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Derek&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you let me know if there is any link / posting that will let me enable debugging the js? I am a newbie to this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Srikant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Principal Consultant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IntrospeQt Software India Pvt Ltd&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.introspeQt.com" rel="nofollow noopener noreferrer"&gt;http://www.introspeQt.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Apr 2009 13:47:20 GMT</pubDate>
    <dc:creator>stallapragada</dc:creator>
    <dc:date>2009-04-22T13:47:20Z</dc:date>
    <item>
      <title>Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185447#M138577</link>
      <description>HiI am having a javascript to extract the custom properties of a document when it is being added to Alfresco. I have a requirement to auto folder this document in a folder that is dynamically created based on the custom property of this document. So, I defined a rule and am having a javascript execu</description>
      <pubDate>Wed, 15 Apr 2009 11:51:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185447#M138577</guid>
      <dc:creator>stallapragada</dc:creator>
      <dc:date>2009-04-15T11:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185448#M138578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Actions (i.e. your javascript) are triggered in the same way that any other behaviour is.&amp;nbsp; It is likely that the metadata extraction is occuring after your custom action.&amp;nbsp; When you apply the rule for your custom action, make it run asynchronously.&amp;nbsp; At that point, the metadata extraction will be done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 09:58:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185448#M138578</guid>
      <dc:creator>derek</dc:creator>
      <dc:date>2009-04-21T09:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185449#M138579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Further to my previous post: I presume that you have set up a custom metadata extractor or configured one of the existing extractors to populate your custom property.&amp;nbsp; Correct?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 10:00:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185449#M138579</guid>
      <dc:creator>derek</dc:creator>
      <dc:date>2009-04-21T10:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185450#M138580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Derek&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for responding.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure if I understood your response. As I mentioned in my post, I have created a custom document type called dc:doc. This has 2 properties called dc:eId and dc:eName.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My requirement is as follows. When a document of type dc:doc is added with the 2 properties (eId and eName), the javascript has to check if a folder with the name eId already exists in the alfresco repository. If it doesn't, I need to create a folder with name as eId and move the document under that folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For this to happen, when a document of this type is added, I need to upfront get the properties on this document. For this I am having the following javascript code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;……&lt;BR /&gt;var empId = document.properties["{&lt;A href="http://www.myintrospeqt.com/model/content/1.0}eId" rel="nofollow noopener noreferrer"&gt;http://www.myintrospeqt.com/model/content/1.0}eId&lt;/A&gt;"];&lt;BR /&gt;&lt;BR /&gt;var empName = document.properties["{&lt;A href="http://www.myintrospeqt.com/model/content/1.0}eName" rel="nofollow noopener noreferrer"&gt;http://www.myintrospeqt.com/model/content/1.0}eName&lt;/A&gt;"];&lt;BR /&gt;……..&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;What I observe is that both empId and empName are null when I print them. Because of this, the rest of the code is not getting executed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also set up the rule to run in the background. I presume that this will ensure that the rule is run in an asynchronous manner.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Appreciate if you can respond to this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Srikant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Principal Consultant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IntrospeQt Software India Pvt Ltd&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.introspeqt.com" rel="nofollow noopener noreferrer"&gt;http://www.introspeqt.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 16:39:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185450#M138580</guid>
      <dc:creator>stallapragada</dc:creator>
      <dc:date>2009-04-21T16:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185451#M138581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There's no obvious reason why that shouldn't work - but it's difficult to tell exactly without seeing more of your script. Have you tried calling:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;document.reset();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;before retrieving the properties? As if you have just extracted meta-data via an action it is possible that the properties values are already cached in the script node from a previous operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 18:32:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185451#M138581</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2009-04-21T18:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185452#M138582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is my js file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var backupFolder = space.childByNamePath("Backup");&lt;BR /&gt;if (backupFolder == null &amp;amp;&amp;amp; space.hasPermission("CreateChildren"))&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // create the folder for the first time&lt;BR /&gt;&amp;nbsp;&amp;nbsp; backupFolder = space.createFolder("Backup");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var logFile = backupFolder.childByNamePath("backuplog.txt");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (logFile == null)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logFile = backupFolder.createFile("backuplog.txt");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (logFile != null)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logFile.content += "starting logging " ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;document.reset();&lt;BR /&gt;var empId = document.properties["{&lt;A href="http://www.Democo.com/model/content/1.0}eId" rel="nofollow noopener noreferrer"&gt;http://www.Democo.com/model/content/1.0}eId&lt;/A&gt;"];&lt;BR /&gt;&lt;BR /&gt;var empName = document.properties["{&lt;A href="http://www.Democo.com/model/content/1.0}eName" rel="nofollow noopener noreferrer"&gt;http://www.Democo.com/model/content/1.0}eName&lt;/A&gt;"];&lt;BR /&gt;&lt;BR /&gt;logFile.content += "empId: " + empId + " empName: " + empName;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;In the log file, I can see the values of empId and empName as null. Just to give you more information, I am also attaching the screenshot of properties page of the document I added. You can see the values of emp id and emp name on it. But these values are not visible in the js file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://i44.tinypic.com/9rsthi.jpg" rel="nofollow noopener noreferrer"&gt;http://i44.tinypic.com/9rsthi.jpg&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you mentioned, I included document.reset() call before getting the properties but I still am not getting the values. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Srikant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Principal Consultant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IntrospeQt Software India Pvt Ltd&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.introspeqt.com" rel="nofollow noopener noreferrer"&gt;http://www.introspeqt.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 04:05:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185452#M138582</guid>
      <dc:creator>stallapragada</dc:creator>
      <dc:date>2009-04-22T04:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185453#M138583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first thing to do is to see what the state of the actual document is when your script is called.&amp;nbsp; Put a break point in the script and then use the Node Browser to dig down to the document and examine its properties.&amp;nbsp; If the properties show up in the Node Browser while the script is returning null, let us know.&amp;nbsp; If the properties are null in the Node Browser, then the Javascript is giving the correct result and the properties really have not been set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Get back to us on this; I have a suspicion on what might be causing it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 12:24:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185453#M138583</guid>
      <dc:creator>derek</dc:creator>
      <dc:date>2009-04-22T12:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185454#M138584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Derek&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you let me know if there is any link / posting that will let me enable debugging the js? I am a newbie to this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Srikant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Principal Consultant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IntrospeQt Software India Pvt Ltd&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.introspeQt.com" rel="nofollow noopener noreferrer"&gt;http://www.introspeQt.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 13:47:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185454#M138584</guid>
      <dc:creator>stallapragada</dc:creator>
      <dc:date>2009-04-22T13:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185455#M138585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK. I figured out how to enable the debugger. In the log4j properties I set the following values to debug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=debug&lt;BR /&gt;log4j.logger.org.alfresco.repo.jscript=debug&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;After setting this and restarting tomcat, I get a swing window called as Alfresco Repository Javascript Debugger.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have set a break point in the javascript and watched the "document". Below is the result of the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;document&amp;nbsp;&amp;nbsp;&amp;nbsp;Node Type: {&lt;A href="http://www.myintrospeqt.com/model/content/1.0}invoice" rel="nofollow noopener noreferrer"&gt;http://www.myintrospeqt.com/model/content/1.0}invoice&lt;/A&gt;, Node Aspects: [{&lt;A href="http://www.alfresco.org/model/content/1.0}auditable" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}auditable&lt;/A&gt;, {&lt;A href="http://www.alfresco.org/model/system/1.0}referenceable" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0}referenceable&lt;/A&gt;, {&lt;A href="http://www.alfresco.org/model/content/1.0}titled" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}titled&lt;/A&gt;, {&lt;A href="http://www.alfresco.org/model/content/1.0}author" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}author&lt;/A&gt;, {&lt;A href="http://www.alfresco.org/model/content/1.0}generalclassifiable" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}generalclassifiable&lt;/A&gt;]&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing I observed is that javascript is able to resolve the type of the document correctly. But the custom properties are showing a value of null. However, in the node browser, I can see the custom property values for this document. Here is the URL for the node browser snapshot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://i39.tinypic.com/iqvrr7.jpg" rel="nofollow noopener noreferrer"&gt;http://i39.tinypic.com/iqvrr7.jpg&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; I am sorry, the type and properties I mentioned here are slightly different from the one I mentioned earlier. However, I am doing the same thing in this as I was doing earlier.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Srikant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Principal Consultant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IntrospeQt Software India Pvt Ltd&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.introspeQt.com" rel="nofollow noopener noreferrer"&gt;http://www.introspeQt.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 14:12:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185455#M138585</guid>
      <dc:creator>stallapragada</dc:creator>
      <dc:date>2009-04-22T14:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185456#M138586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another way to launch the debugger that does not require a config change, go to the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow noopener noreferrer"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;yourserver&amp;gt;:&amp;lt;yourport&amp;gt;/alfresco/service/index&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and select the Alfresco JavaScript Debugger link and Enable the debugger. You may need to "Refresh Webscripts" before to remove any compiled javascript from the cache.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kev&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2009 08:25:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185456#M138586</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2009-04-23T08:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185457#M138587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you expand the node object in the debugger and look at the "properties" collection - does it show the values in that?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2009 08:26:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185457#M138587</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2009-04-23T08:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185458#M138588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can see the custom property names but the values for them is null in the debugger. However I can see values for certain properties like name and title.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Srikant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Principal Consultant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IntrospeQt Software India Pvt Ltd&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.introspeQt.com" rel="nofollow noopener noreferrer"&gt;http://www.introspeQt.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2009 12:26:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185458#M138588</guid>
      <dc:creator>stallapragada</dc:creator>
      <dc:date>2009-04-23T12:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185459#M138589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code that handles the upload is &lt;/SPAN&gt;&lt;STRONG&gt;AddContentDialog&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp; This goes through two phases (see &lt;/SPAN&gt;&lt;STRONG&gt;BaseDialogBean&lt;/STRONG&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/SPAN&gt;&lt;STRONG&gt;finishImpl&lt;/STRONG&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;STRONG&gt;doPostCommitProcessing&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp; The post commit processing is actually where the user is given the opportunity to enter further metadata, but the document has already been uploaded into Alfresco i.e. the document upload transaction was committed.&amp;nbsp; Your initial action is probably firing after the first commit and hence not seeing the custom metadata, even though it might appear, to the user, that the document upload is not complete.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your script action will have to handle both initial upload (with or without full metadata) and updates of the metadata.&amp;nbsp; To do this, you will have to trigger your actions off document updates as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2009 14:23:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185459#M138589</guid>
      <dc:creator>derek</dc:creator>
      <dc:date>2009-04-23T14:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185460#M138590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you detail me or point to a location on how to do this? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Srikant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Principal Consultant&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IntrospeQt Software India Pvt Ltd&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.introspeQt.com" rel="nofollow noopener noreferrer"&gt;http://www.introspeQt.com&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2009 07:02:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185460#M138590</guid>
      <dc:creator>stallapragada</dc:creator>
      <dc:date>2009-04-24T07:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get custom property value through Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185461#M138591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi stallapragada,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wrote following JavaScript for similar requirement (Loan related document upload)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var prop = document.properties["custom:applicationNo"];&lt;BR /&gt;var existsSpace = space.childByNamePath(prop);&lt;BR /&gt;var dest;&lt;BR /&gt;&lt;BR /&gt;if(existsSpace == null)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;dest = space.createFolder(prop);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.move(dest);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.move(existsSpace);&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Created rule on update event instead of Inbound event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nikesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 08:42:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unable-to-get-custom-property-value-through-javascript/m-p/185461#M138591</guid>
      <dc:creator>nikes</dc:creator>
      <dc:date>2009-06-23T08:42:26Z</dc:date>
    </item>
  </channel>
</rss>

