Add line information in Notification Template - acumatica

I saw in the help files that the line information can be added to the notification template.
From Help
You can include information from document detail lines in
notifications by adding a foreach loop to the body of the notification
template in the HTML format. For instance, you can use the following
construction for notifications on opportunities:
<foreach view="Products”>
((Products.InventoryID)) - ((Products.Quantity)) - ((Products.CuryExtPrice)) <br>
</foreach>
I tried to put similar body in HTML, but when i save, it disappears!!!
I tried in version 5.3 and Acumatica 2017 R2
The following is what i tried to add for purchase requisition line information.
<foreach view="Lines”>
((Lines.InventoryID)) - ((Lines.OrderQty)) - ((Lines.CuryEstUnitCost))
</foreach>
In the Acumatica 2017 R2, I am getting an error saying
There is no active notification source to process the operation

Issue what you are seeing is due to incorrect closing quote.
"Products” should be "Products" and
"Lines” should be "Lines"
Also, there's no need to switch to HTML format.

Related

Acumatica and notification template - strips html and other style tags - 2019 r1

We are seeing issues where style tags and other markup is being stripped and modified within Acumatica's Notification templates when we save the template.
We have an email template coder coding out responsive cross client templates, and when we paste the code directly into the html editor, it strips out a lot of the code and markup.
Does anyone have any idea if there are restrictions or specific syntax that is need to work with notification templates? I have searched and read all that i could find.
For reference, we are on 2019 r1.
Thanks in advance

Page template - Object reference not set to an instance of an object

I have a page template that has this line of code below:
<div id="<%= CurrentDocument.NodeAlias %>" class="lvl3">
Things work - the id value shows correctly. However, when using the Page Templates module Design tab, there's an error. In Event log, I saw the error message "Object reference not set to an instance of an object". Taking the id snippet out, the error is gone. I'm not sure what the error means and how to fix it. Could you help?
I do need some page-specific unique identifier in there (NodeAlias in this case) for other purposes.
The answer is pretty simple - if you open your page template in Kentico Page Templates application - your CurrentDocument is always null (because you are editing Template itself without specific document).
You could do absolutely the same thing in Pages application with the Design tab. It's also possible to edit all the template properties from there, including the Layout:
Using code blocks on page template layout is not supported. I assume you are using ASCX layout. Moreover your code looks more like a macro - so, maybe you are using HTML layout type? If yes, then the syntax should be {%CurrentDocument.NodeAlias%}
If you are using ASCX layout you may face also this issue: https://devnet.kentico.com/articles/the-controls-collection-cannot-be-modified-because-the-control-contains-code-blocks
Note that in portal engine the life cycle is bit modified, so we cannot ensure the code blocks will work every time - it may work sometimes. It mainly depends on what other web parts/controls and in what order are placed in the page template. I would rather recommend using the workaround from the article.
Or, you can give it a try, with no guarantee, this may work in certain cases, you need to specify the full namespace:
<%= CMS.MacroEngine.MacroResolver.Resolve("{%CurrentDocument.NodeAlias#%}") %>

How to get the last comment in Jira script listeners (Send custom email)

we have been using "Script Runner" plug-in to send custom emails. The below code works fine transition post function.
<% if (lastComment)
out << lastComment
%>
Whereas, the custom email in script listeners below line instead of the actual last comment
com.atlassian.jira.issue.comments.CommentImpl#4fexxxxx
Can you suggest a solution for this please.
If you look at the documentation for that class, you probably want to get the lastComment.body

the file '/_controltemplates/.ascx' does not exist

I am making a SharePoint visual web part project for SharePoint 2013. The web part was working fine till yesterday but now it is giving following error.
The file
'/_CONTROLTEMPLATES/VisualWebPartProject/Export/ExportUserControl.ascx'
does not exist
I have two solutions below which discuss this problem but I don't seem to apply solution in my case.
For e.g. solution 1 below discusses that I should open my ascx page there I have registered the user control and change CONTROLTEMPLATES to _CONTROLTEMPLATES. Problem is I don't have any such line in code to change.
Similarly in solution 2 below I don't know where I should change SharePoint version path which is /15/
Solution 1
http://johanleino.wordpress.com/2010/12/08/ascx-was-not-found/
Solution 2
http://blog.entos.at/Lists/Posts/Post.aspx?ID=6
If you picked Visual Web Part (Farm Solutions Only) from Add Item menu, you should see a cs file having same name with the web part. In that cs file there exists a constant with a comment above :
// Visual Studio might automatically update this path when you change the Visual Web Part project item.
private const string _ascxPath = #"~/_CONTROLTEMPLATES/15/ProjectName/VisualWebPart2/VisualWebPart2UserControl.ascx";
You can clearly see the version (15) above.
Register the user control using the following code: (Important: remove the TagName!)
<%# Register
Assembly="BBB.XXXX.Webparts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b86a9e59abbaa56b"
Namespace="BBB.XXXX.Webparts.ControlTemplates.BBB.XXXX.Webparts"
TagPrefix="uc1" %>
You can get the assembly from web.config
then register the control like this:
<uc1:WorkflowComments ID="WorkflowComments1" runat="server" />

IBM Connections 4.0 iWidget title attribute not working

I have added a new tab in my profile page of IBM Connections 4.0 by registering it in widgets-config.xml file the tab is successfully added and is working fine but the problem is i want to give some custom name to the tab like "Hello World" i tried adding title attribute to the iWidget xml file but its not working, the server is always picking the defId used in the widgets-config.xml as tab name instead of the title attribute,i also tried adding the name in widgets-config.xml file itself but the space is causing the problem. Any help in this regard is greatly appreciated.below is how the iWidget xml file looks like.
<iw:iwidget name="helloWorld" title="Hello World" xmlns:iw="http://www.ibm.com/xmlns/prod/iWidget"
iScope="HelloWorldWidgetClass" supportedModes="view">
<iw:resource uri="helloworld.js" />
<iw:content mode="view">
<![CDATA[
<div id="frameHolder" style="width:678px;height:606px;">
<iframe id="testFrame" style="width:inherit;height:inherit;border:none;"></iframe>
</div>
]]>
</iw:content>
Thanks,
Vinay
The wording used in iWidgets 2.1 spec document suggests that the use of the title attribute is not mandatory by the container:
title: This attribute suggests a title that could be used in any decoration (e.g. titlebar) around the iWidget. This item can be set in both the iWidget definition and the microformat placing an iWidget instance on a page.
I suggest opening an IBM Connections PMR to bring this issue to the attention of the development team.
In Connections, the title and descriptions for iwidget are both defined in widget-config.xml by "defId" and "description". You could add NLV support for these 2 string by add "Customizing product strings" to Connections.
Here is a brief steps to do that:
in widget-config.xml
in LotusConnections-config.xml
put your strings file in
/strings/com.xxx.myWidget.properties
/strings/com.xxx.myWidget_en.properties
...
/strings/com.xxx.myWidget_zh.properties
in each of the property file:
myWidget=My widget title
myWidget.desc=My widget description
The detailed steps could be found in Connections product document, but the idea is same, to provide customize string support for 3rd party iwidget.

Resources