I needed access to the private address books of a user in Windows.
The software I am working on is using C++ and using anything else is not an option.
I solved all the problems except for how to access the photos that are stored with the contacts in Outlook (or any other MAPI address book provider).
The information I need:
What format are those pictures stored in?
Which property type (PR_XXX) is my code supposed to query for?
But maybe those pictures cannot be retrieved like other properties of the contact (e.g. like surname or email address)
In case of OAB, you will need to extract the IPM.Conntact message entry id property from the address book entry id (OAB entry id format is documented on MSDN), open the message, then read its attachments. The picture attachment will have PR_ATTACHMENT_CONTACTPHOTO property set to true
Related
When defining new email and postal greeting formats in Administer > Communications > Email Greeting Formats, I see a lot of available variables like {contact.first_name}, {contact.last_name}, and so on.
I would be happy to see the list of all available variables.
More precisely, when I refer to {contact.individual_prefix}, I have access to the field Label of the corresponding table, but I want to access the field Description of the same table. I would like to know if this is possible, and if I have to install some extension in order to achieve that.
I posted this question also on https://civicrm.stackexchange.com
I received an answer there; see: https://civicrm.stackexchange.com/questions/39053/what-are-all-the-possible-variable-fields-available-in-greetings-email-and-post/39054#39054.
In my project I have to use geocode to validate user input address fields. This includes Address, City, State, and Zip. When user entered value those information are sent to geocode server as http parameters. The return result is xml file content. I use ColdFusion 2018 as my back-end programming language. I'm able to navigate through the document and get to the section that contains data. Here is example of what I get back from geocode:
As you can see in the image above I will get the information with overall correctness of the address. My question is how this should be handled and presented to the user before I save data? Should I display the returned data back and tell them that address is 100% correct like in this case or maybe if address is not 100% show them the address as suggestion? I'm not sure which approach is the best way to go and I never used geocode before. Any help would be greatly appreciated.
Seeing release 1.3.3 of the smartsheet SDK and the ability to import XLS files straight from the SDK (which I haven't tried yet), I started thinking about how I would be able to achieve my goal to upload very large sheets with a minimum number of requests.
(see related questions: Building whole sheet programmatically with Python SDK, How to create a project sheet via the python SDK)
My current test methodology is to import an XLS file (though the UI so far), which comes in not formatted properly (Trying to make a project sheet, with gantt view, and resource management).
Using the python SDK, I use the Sheets.copy_rows() method to copy the rows from the sheet that was imported in the UI, to another blank sheet that is created following my project sheet template.
This seems to work perfectly, with the exception of the contact column, in which I would like to display the contact name rather than the contact email address.
According to https://smartsheet-platform.github.io/api-docs/?python#contact-list-columns:
When creating or updating cells for a contact list column, the
displayValue attribute works as follows:
If displayValue is non-null and non-empty, the Smartsheet cell displays the value provided.
If displayValue is an empty string, the Smartsheet cell displays the email address.
If displayValue is null or absent, Smartsheet makes a best guess effort at filling it in with a contact’s name based on the email
address.
Looking at the sheet I created from the import, I can see my cell data as: {"columnId": 7027801426552708, "value": "eleroy#******.com"}.
According to the doc above, since displayValue is absent, I was hoping the copy into a contact list column would attempt to fill with the contact's name based on the email address.
Is there a way I can force it to convert to the contact's name either on XLS import or during the copy?
Edit:
As seen with some of the answers below, I guess it makes sense that the copy would copy the data as is, so I'm left trying to have it fill in the contact name on XLS import.
I am trying to find a way to inject both the display value and the value in Excel, but haven't succeeded yet. I have tried Hyperlinks, email links, =HYPERLINK() formula, but so far no success.
If you set the Value with the email address and the displayValue as the contact name, you should be able to get what you're looking for. For example, the following body of a generic HTTP request would display "MyUser Gmail" in the cell, but have the myuser#gmail as the contact email.
[
{
"toBottom": true,
"cells": [
{
"columnId": 6xxxxxxxxxxxxxx8,
"value": "myuser#gmail.com",
"displayValue": "MyUser Gmail"
}
]
}
]
If the displayValue is empty, it's an indication that this cell's Contact does not have a name associated with it. If your original sheet does include a name, the point of failure is likely in the copy process.
Without looking into the Python SDK, I might guess that copy_rows() is only copying by value and not displayValue. Try manually setting the value/displayValue of the contact cell and see if that works.
Using the Directory API I am able to update the individual address attributes e.g. streetAddress, region and postalCode.
However the 'formatted' attribute still has the old address and it is this that shows in the users Directory profile. The 'formatted' attribute is not writable so how does this get updated with the new address?
I was having trouble getting my addresses to display correctly as well. But at the time I didn't know about the "formatted" attribute. After working with support, the solution was to also update the "formatted" field with whatever you want displayed for their address. It is a writeable attribute for me.
Example:
{
"type":"work",
"formatted":"123 Nowhere Somewhereville MN 55555",
"streetAddress":"123 Nowhere",
"locality":"Somewhereville",
"region":"MN",
"postalCode":"55555"
}
I've been asked to look at windows service which retrieves data from an Active Directory tree using the win32 LDAP API and outputs JSON data to a text file. It works fine but I need to modify it so that the i get the 'pre windows 2000' login name. The service is written in c++.
The service already successfully retrieves various other attribute strings using:
PTSTR *pszValues=ldap_get_values(pLdap,pEntry,szAttribute);
and:
if (_tcscmp(szAttribute,TEXT("uUsnChanged"))==0) // uSNChanged is an example of an attribute
pItemInfo->uUsnChanged=_tcstoui64(pszValues[0],NULL,10); // pItemInfo is a struct defined elsewhere to hold the results for any given entry
i looked on http://msdn.microsoft.com/en-us/library/ms679021(v=VS.85).aspx to see if there is an attribute for 'pre windows 2000' login or something similar in the hope that I could just add this as another 'szAttribute' (to replace "uUsnChanged" in this example) and had no luck. Looking at the API i have been unable to come up with a way of getting this information.
i found the attribute 'sAMAccountName' which i thought would provide the information needed but it only gives me the name part of the DOMAIN/name format. Typical, it's the other part i want!
does anyone have any ideas on how to get the 'pre windows 2000' string from 'pEntry'?
#JPBlanc We are getting the correct nETBIOSName attribute now when running it on the test server. The app works on the assumption that there is a maximum of one nETBIOSName attribute per DC. It finds it by doing the following:
gets the default host using ldap_init(NULL,0)
get the 'configuration naming context' using ldap_search_s(pLdap,NULL,LDAP_SCOPE_BASE,NULL,pszAttrs,FALSE,&pResults); passing in the connection handle as the first parameter
retrieves the 'configurationNamingContext' attribute using ldap_get_values(pLdap,pEntry,TEXT("configurationNamingContext"));
concatenates "CN=Partitions," to the beggining of the string giving something like "CN=Partitions,CN=Configuration,DC=domain,DC=com,DC=au"
it then performs a search using ldap_search_s(pLdap,szPartitionNC,LDAP_SCOPE_SUBTREE,TEXT("(nETBIOSName=*)"),pszAttrs,FALSE,&pResults);
then it loops through the results looking for anything with a 'nETBIOSName' attribute and once it finds one it breaks out of the loop and returns the value.
Do you know if this is sufficient to work in any AD configuration?
Be careful, the Domain part of the 'pre windows 2000 domain' can be completly different from the user Principal Name (user#domain) use to logon onto Active-Directory. the DOMAIN is the Primary Domain Controleur name or the Netbios domain name. DOMAIN is created during domain creation, by default it's part of the DNS name, but it can be completly changed during domain creation.
You can find it with nETBIOSName attribute :
ldifde -f netbios.ldf -d "CN=Partitions,CN=Configuration,DC=your-DNS-Name" -r "(netbiosname=*)"
A best filter would be
(&(objectcategory=crossref)(dnsHostName=<DomainDNSName>)(netbiosname=*))
SAM-Account-Name Attribute (sAMAccountName)