Outlook contact "File as" field value - mfc

How do I programmatically read the default setting for "File as" field for Outlook contacts by a specific user. This is the same info we can get via the file->options->contacts menu.

Check the FileAsOrder value in HKEY_CURRENT_USER\Software\Microsoft\Office\\Outlook\Contact.
0x8017: LastFirstMiddle;
0x8037: FirstMiddleLastSuffix;
0x3A16: Company;
0x8019: LastFirstMiddleCompany;
0x8018: CompanyLastFirstMiddle;

Related

How do I add validation to text area in oracle apex

I am feed up with this Oracle APEX application , their is no proper videos or documentation
I have a Text area field and button
On button click I have written a PL/SQL code to send mail
Is their any way I can populate error / success message on screen
If text area is empty does not have any data then display error message on screen as Text area field is empty
My code :
BEGIN
if (:textarea1 is not null ) then
APEX_MAIL.SEND(p_from => 'alice#example.com',
p_to => 'bob#example.com',
p_subj => 'Email from Oracle Autonomous Database',
p_body => 'Sent using APEX_MAIL');
else
--popup error message on my screen -> `textarea` filed cannot be empty
end if;
END;
The following package of ADD_ERROR.ADD_ERROR does not exist at my end
If text area is empty does not have any data then display error message on screen
You don't need your own validation for that; just set that item's Value required property ON.
Additionally, you can even set process' Server side condition to
When button pressed: pick the button you use to send an e-mail
Type: Item is not null; pick the text area item
You commented that it isn't working. Well, it is. If it doesn't for you, then you did something wrong (although, I can't imagine what would that be, regarding the fact that it is just one property you had to set).
So: if I leave the text area empty and push the button, error message is here:
As of a video with demonstration: I don't have any. Google for it, if you desperately need it.

Oracle APEX - how i can change translate action menu language (interactive grid and report)

I'm trying to change the language of default UI elements language in my APEX application to Arabic language :
i change the button (excepted interactive button) and column header language using XLIFF file , but i can't change action menu language , how i can do that if it possible.
You have to create new "messages":
Try to find message id:
select *
from APEX_APPLICATION_TRANSLATIONS
where WORKSPACE = 'INTERNAL'
and message_text = 'Subscription';
Copy TRANSLATABLE_MESSAGE field value (e.g. APEX.IG.SUBSCRIPTION or APEXIR_SUBSCRIPTION) and remember IS_JS_MESSAGE value
Go to Shared Components -> Globalization -> Text Messages -> Create Text message
Put id id name field (APEX.IG.SUBSCRIPTION)
Select your language
Fill "Text"
Select the same value as already exists in field IS_JS_MESSAGE
Your application language must me the same with this new message.

Unchecking checkbox in oracle apex

Created an report with checkbox using apex_item and when checked more than one check box i will display alert message "not to check more than one checkbox with ok button " after clicking ok it should be unchecked . please find my JavaScript code that displays alert message
if($("input[type=checkbox]:checked").length > 1)
{
var msg = alert('You are not allowed to select more than one employee');
}
It's best to use the APEX JavaScript APIs for this type of thing. You can find them here: https://apex.oracle.com/jsapi
If you're getting started with JavaScript and APEX, you may find these slides useful: https://www.slideshare.net/DanielMcGhan/getting-started-with-javascript-for-apex-developers
Here's a solution that should work for you (just change the name of the item to match yours):
var cbItem = apex.item('P1_CHECKBOX');
if (cbItem.getValue().length > 1) {
alert('You are not allowed to select more than one employee');
cbItem.setValue(); // Passing nothing to clear the value
}

Sitecore custom ribbon button not working

I have created a custom ribbon button following the steps mentioned in http://jondjones.com/how-to-add-a-custom-sitecore-button-to-the-editor-ribbon/
I can see the button appearing in sitecore:
Custom button
Command does not get triggered when clicked on the button.
Below is my code:
using System;
using Sitecore.Shell.Applications.Dialogs.ProgressBoxes;
using Sitecore.Shell.Framework.Commands;
namespace SitecoreVsPoc.Commands
{
public class TranslateContent : Command
{
private static readonly object Monitor = new object();
public override void Execute(CommandContext context)
{
if (context == null)
return;
try
{
ProgressBox.Execute("Arjun", "Title", "Applications/32x32/refresh.png", Refresh);
}
catch (Exception ex)
{
Sitecore.Diagnostics.Log.Error("Error!", ex, this);
}
}
public void Refresh(params object[] parameters)
{
// Do Stuff
}
}
}
Below is the command I have registered in commands.config:
<command name="contenteditor:translatecontent" type="SitecoreVsPoc.Commands.TranslateContent,SitecoreVsPoc" />
Note: I am using Sitecore 8.2 initial release.
Can someone suggest a solution for this?
In Sitecore 8 it was changed the way you add Ribbon button. As far I see your link is from Sitecore 7 or 6.
To create the new button item for the Experience Editor ribbon:
In the Core database, open the Content Editor and navigate to /sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Page Editor/Edit.
Create a new item based on the relevant ribbon control template, for example, the Small Button template. The templates are located at /sitecore/templates/System/Ribbon/.
For the new item, add the following information:
In the Header field, enter the display name of the button.
In the ID field, enter a unique identifier for the item. For example, you can include the ribbon group name in the ID.
In the Icon field, enter the path to the relevant icon. Depending on the button you create, adjust the icon size accordingly.
Open Sitecore Rocks and add the relevant control rendering, for example SmallButton, to the layout of the button item you created.
Enter a unique ID for the rendering.
For other SPEAK controls, you can point to another item in the Data Source field and specify the configuration in this other item.
Important
More informations you can find here: https://doc.sitecore.net/sitecore_experience_platform/content_authoring/the_editing_tools/the_experience_editor/customize_the_experience_editor_ribbon
http://reyrahadian.com/2015/04/15/sitecore-8-adding-edit-meta-data-button-in-experience-editor/
Before it was very simple, you didn't need to add new code:
https://blog.istern.dk/2012/05/21/running-sitecore-field-editor-from-a-command/

Deleting a row in IR in Apex 4.2

Back with a new issue. I want to delete a row from an IR by having a delete icon as a column in the report itself and when I click on that icon a DA will fire which will call a code to delete that record and also will call API to delete the rows from fnd_attached_documents.
I did the following
Created an IR with the following query :
SELECT nvl(to_char(task_id), '-') "Title",
'-' "Type",
nvl(description, '-') "Description",
'-' "Category",
-- nvl(last_updated_by,'') "Last Updated By",
nvl((SELECT v('APP_USER') FROM sys.dual), '-') "Last Updated By",
nvl(last_update_date, SYSDATE) "Last Updated",
dbms_lob.getlength(file_content) download,
attachment_id,
document_id,
media_id,
'' "Delete"
FROM my_attachments
WHERE task_id = :p2_case_number;
Delete is not a column in the table and P2_CASE_NUMBER is an Item. Once the report was created I went to the report attributes --> Column Attributes and clicked on the Edit icon of delete and in the column link selected the icon and target as URL gave the following URL -
My DA is as follows
Name - DELETE_ATTACHMENT
Event- Custom
Selection type - DOM Object
DOM Object Title
True Action : PL/SQL code
DECLARE
lv_case_number NUMBER;
lv_attachment_id NUMBER;
BEGIN
lv_case_number := :P2_CASE_NUMBER;
APPS.DELETE_FILE_ATTACHMENT(lv_case_number,lv_attachment_id);
END;
Now I am facing the following issue and dont know what to do about them
I need to pass the attachment Id coming from the report as the second parameter to procedure I am calling, so how do I do that?
I need to refresh my report region only so that when delete happens I dont have to refresh the page myself?
I am using ebs r12 and apex 4.2
Thanks
You have to add the attachment id to link attributes and also a css class, that you can reference later in the DA:
data-id="#ATTACHMENT_ID#" class="delete-row"
You will need a hidden item to save the attachment id of the clicked row. In this example:PX_ATTACHMENT_ID
Then create a DA that is triggered when the link is clicked:
Event:click,Selection type:jquery selector,jquery Selector:.delete-row
Event scope of the DA should be dynamic, otherwise it won't work after the first refresh of the region.
Add a true action:
Action:set value,Set Type:Javascript Expression,Javascript Expression:this.triggeringElement.getAttribute('data-id'),Affected Items:PX_ATTACHMENT_ID
Add another true action:
PL/SQL Code to delete the attachment and make sure that you add PX_ATTACHMENT_ID to Page Items to Submit
Add another true action:
refresh report
https://apex.oracle.com/pls/apex/f?p=111339:2