Accessing ActiveDirectory properties belong to objectClass=posixGroup - active-directory

I am trying to update the memberUid property of the posixGroup.
I do a directory search and find my record. If I loop through the searchresults.property I can list the values (it is defined as Multi-value) of the field.
I define a DirectoryEntry using the searchresults.getdirectory method.
If I do anything with the property from this directoryentry, for instance check if it exists (property.contain), or list it or try to update it I get an unknown error x'8000500C'.
The fields cn and description' do not cause this problem.
If I add other user defined properties I also get the error.
How can I work with properties belonging to this type of schema?

Your error looks like it is:
8000500c The Active Directory datatype cannot be converted to/from a native DS datatype
This seems to imply that the data returned is not a native AD datatype.
There seems to be a workaround at this article.

Related

Getting extended properties on users objects

I try to query a user including extended properties:
/users/xxx#xx.dk?$expand=properties
However I get following error:
Could not find a property named 'properties' on type 'microsoft.graph.user.
Is it possible in one request to get a user object with all of it's extended properties?
Best scenario would be something like following where I query for the departmentNumber from the extended properties with direct properties:
/users/xx#xx.dk?$select=companyName,officeLocation,departmentNumber&$expand=properties
This is because, as the message states, there is no property named properties.
How you retrieve custom properties depends on how they were created. There are two types: Open Extensions and Schema Extensions. Each is stored and behaves a little differently so you'll want to refer to the documentation I linked to for help determining which type you want to use.

INVALID_FIELD_FOR_INSERT_UPDATE in Salesforce via API

I am trying to make a batch update to Salesforce as part of a data masking project and am getting the error INVALID_FIELD_FOR_INSERT_UPDATE when I try updating fields of a particular custom object via API.
Our custom object has a few standard fields and a few custom fields. The custom fields are what I'm trying to update but I keep getting denied.
Each field that I'm trying to update is either Long Text Area(32768) or Text(255). There are no lookups, controlling fields, validation rules, nor are there field dependencies.
I am able to make modifications to other objects (Account for example) via the masking process. I am also able to make modifications to the values through the web UI on the values for this custom object.
I've tried as members of the API group as well as System Administrator.
Can anyone please point me in the right direction? I don't have access to the source code of the masking tool, but I do have elevated rights in SF.
Thanks in advance for your advice.
The exact error:
INVALID_FIELD_FOR_INSERT_UPDATE Error message: Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile or permission set.
The funny thing is that I'm not trying to update the field "Name". Name seems to be an auto-number field on the object, but I'm not sure why this field would change value on an update to a different column.
If some one facing the same issue of not able to update the Name column because it has data type as Name.
There are 2 solutions:
If you want to push the name of human then try pushing FirstName and LastName instead. "Name" will get populated automatically.
If you want to push the name of a product then try changing the type of Name field to Text. If that doesn't work then you can push the name to either FirstName or LastName, whichever is mandatory(Just A work around).

Save error: Initial term of field expression must be a concrete SObject: MAP<String,AcctId__c>

I'm trying to get over a limitation in Salesforce where Lead objects can't have related lists that convert with the Lead over to Opportunity, Contact and Account. I have set up 4 objects of type Lookup Relationship, and created a dummy record in each.
I want to use Custom Settings to store the id of each of these dummy records, so that when the Lead converts, any custom objects can also convert to objects with Master/Detail relationships on the respective standard objects.
My trigger on Lead(after update) tries to create a Map of the Custom Settings:
Map cs = AcctId__c.getAll();
AcctId__c is the Custom Setting api name. Compile time is giving me the above message.
Now, I copied this code directly from the Salesforce documentation. What am I forgetting?
I believe that you must include the actual map definition <String,AcctId__c> after the word Map.
Check out this page.
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections_maps.htm

Drupal 7, Get values of an Entity Reference in a Field Collection

I've got a field collection, which contains
A copy field
A user field, via entity reference
Now when I try to access the copy field by storing the collection in $collection, via
$collection->field_my_collection_copy->value();
I get what im looking for, but trying similar on the entity referenced field
$collection->field_my_collection_user->value();
It breaks. By looking into the variables for $collection->field_my_collection_user I should have 'uid' available on it, but $collection->field_my_collection_user->uid gives me nothing and $collection->field_my_collection_user->uid->value(); gives me Unable to get the data property uid as the parent data structure is not set
It could be because Field Collection doesn't inherently know what node type their parent is associated with.

How to differentiate new added objects and updated objects in DirSync search results (Active Directory)?

Both new added objects and updated objects are returned in DirSync search results, from Active Directory server.
How to differentiate them, in SearchResponse?
http://msdn.microsoft.com/en-us/library/system.directoryservices.protocols.searchresponse.aspx
As we know, if an AD objects has been deleted, its attribute 'isDeleted' is marked as TRUE.
Thanks in advance.
I don't know that you can. You may need to cache all of the objectGuids locally and do a lookup to see if the objectGuid is one you don't know about.
DirectorySearcher will only return attributes that have changed. WhenCreated is only changed when an object is created, so if it has a value then you're looking at a new object, otherwise it's an update.

Resources