Generating a custom Sitecore log on a button click - sitecore

Can we generate a custom log file in Sitecore on a button click() event? I know the concept of creating Sitecore custom log files on per day to day basis, but I am not able to generate the log file every time while clicking on a button.

Related

Refresh only one region instead of the whole page in oracle apex

I have made a region containing 2 display only items and a button.
The button performs some dynamic action (execute pl/sql query) and the page is refreshed every time the button is pressed (submit page action) .
Is there any way that on click of the button only that particular region gets refreshed instead of the whole page?
Also for the display only items, lets say
item_label ==> item_display_value
how to add this (==>) symbol in between?
If the page is submitted, then it will refresh completely - that is how apex works. But if a submit is not needed, you can add an action of "refresh" to the dynamic action and remove the submit. Make sure the "Behaviour > Action" property of the button is set to "Defined by dynamic action".
Note that not all region types support refresh, but all report types do.

Workflow state in Sitecore is blank when you create and save a datasource from experience editor

So here is the step to replicate.
Create a blank page,
Open Experience Editor and add a component that needs a datasource.
Select create a new datasource in the popup window.
Save the page in experience editor
Open the datasource in the Content editor and take a look at the workflow state section. It will be blank instead of having the initial workflow state.
This only happens for non admin users.
Creating a new datasource directly in Content Editor (not Experience Editor) works fine.
** Note that when experience editor creates the datasource, if you go to Content Editor and open the item, the workflow state will be there. It is after you save the page in experience editor that the worflow state is set as null.
So after 5 days debugging Sitecore code and pipelines I found the issue.
The enableWorflow="true" attribute was missing in the site definitions.
The code that was causing the issue was the .Lock step in the SaveUI pipeline.

C++ Outlook MailItem replace body and discard on close

I have an addon in Outlook which adds warning to mailbody and links in the email when email is coming from external or untrusted sources.
Anyway, when I replace something in body, when email is opened in full view (no reading pane, double click full view of mail item), I hook mailItem close even and I discard changes, everything works well. (mailitem.onclose(olDiscard))
When I do this with reading pane on, when I discard the changes, Outlook still either saves the changes or when user is trying to close Outlook it asks user "Do you want to save changes to ....." and if user clicked on multiple emails during this period, it shows popup question for ALL emails user clicked and we replaced its body.
What's the solution here? What can I do to fix this? I want to make changes to link and to body, but discard them when user clicks away on another email. End goal is not having Outlook to ask user "Do you want to save changes ..." popups. Please advise.
I can't also make changes to inspector, because inspector is read-only.
P.S. plugin is written in C++.
The solution is to avoid modifying the message body if you do not want to keep the changes.
If you want to show a warning to the user, add a task pane to the inspector. Or simply stamp the message with a category - it will be shown in the inspector.
The Outlook object model doesn't provide anything for handling hyperlinks clicks. As a possible workaround you may consider implementing the following functionality:
When the item is selected or opened in Outlook you may replace the original URL with your own where you can pass the original URL as an encoded parameter if needed. So, if it is allowed to open the URL you can redirect the request further. Note, you can use the SelectionChange event of the Explorer class which is fired when the user selects a different or additional Microsoft Outlook item programmatically or by interacting with the user interface. This event also occurs when the user (either programmatically or via the user interface) clicks or switches to a different folder that contains items, because Outlook automatically selects the first item in that folder. However, this event does not occur if the folder is a file-system folder or if any folder with a current Web view is displayed.
Also you may consider handling the Open event of Outlook items which is fired when an instance of the parent object is being opened in an Inspector. When this event occurs, the Inspector object is initialized but not yet displayed. The Open event differs from the Read event in that Read occurs whenever the user selects the item in a view that supports in-cell editing as well as when the item is being opened in an inspector.
Another possible solution is to register a custom URL handler. So, basically, your registered application will be launched instead of a web browser where you can decide whether to launch a web browser and follow the URL or not. See Installing and Registering Protocol Handlers for more information.

Sitecore Experience Editor Publish Menu

I am trying to publish entire site from experience editor. However publish option in Home menu only showing up Publish Item Dialog. Is there any way I can publish site from experience editor.
The reason is my current item has sublayouts with datasources at different folders in sitecore tree. When I do publish Item, item changes get published along with images however changes made to datasources in item doesn't reflect in publish site.
I am publishing items with sub items and related items check box ticked and as per documentation from sitecore it only publishes alias, media and clone references. But datasources changes on item doesn't get published.
Switch to the Core database
Open the Content Editor
Navigate to /sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Page
Editor/Publish/Publish
Duplicate this item
Change the value of the "Click" field to "system:publish(id=$Target)", the value of "Header" to "Publish Site" and the value of "Tooltip" to "Publish the current item."
Switch to the Master database
Open the Experience Editor and you will be able to see the "Publish Site" button on the ribbon.

Execute custom javascript function on refresh button click in of Kendo upload control

I have been using the Kendo Upload control, in one of my project.
Once I hit the upload in, upload file popup, if there is any error the upload panel stay there. We display error message in another flyout which stays there for around 30 seconds.
When there is an error, there is no more upload button avaibale, in upload file popup, but we have refresh button.
What I want to do is, I want to execute a jquery function which can hide the error message.
How can I get access to refresh button event, as I do not see any event of refresh button in kendo upload.
We are using kendo mvc wrapper.
Hitting on refresh button should call your upload event.
What you can do is register for the upload event as below:
#(Html.Kendo().Upload().Name("uploadFile")
.Events(e =>
{
e.Upload("onUpload");
})
You can have then onUpload javascript function and hide your error flyout.
Note that above function will also get called on upload buttton click.