Hello All,
There is a need to update the status of the record in MV when there change in value for location in SQL table, The code is working for the existing user, it fails for the New user with the Error message. Kindly advice.
Microsoft.MetadirectoryServices.AttributeNotPresentException: Attribute "location" is not present.
at Microsoft.MetadirectoryServices.Impl.AttributeImpl.get_Value()
at Mms_ManagementAgent_SQLMAExtension1.MAExtensionObject.Microsoft.MetadirectoryServices.IMASynchronization.MapAttributesForImport(String FlowRuleName, CSEntry csentry, MVEntry mventry)
The below is scenario
NEW - Update mventry["status"].value = "NEW"
Update - Update mventry["status"].value = "Update"
No Update - Update mventry["status"].value = "No update receive"
Advance attribute flow is mapped location(Datasource)->location(MV)
The Code is below
case "Status":
if ( string.IsNullOrEmpty(mventry["location"].Value)== true)
{
// New creation
mventry["status"].Value = "NEW";
}
else
{
if (csentry["location"].Value == mventry["location"].Value)
{
// NO Update
mventry["status"].Value = "No update receive";
}
else
{
//Update
mventry["status"].Value = "Update";
}
}
break;
Thanks and Regards,
Anirban Singha