Quantcast
Channel: Forum Microsoft Identity Manager
Viewing all articles
Browse latest Browse all 4767

How to update a date field

$
0
0

Hi experts,

I have an SQL MA to export data from FIM to a an SQL table, in that table i have 2 dates format fields "whencreated" and "whenupdated".
I created a custum rule extension to manage this 2 fields because i want to put the date and time when the run  profile is processing the data.
my code is:

--------------------------------------------------------------------

switch (FlowRuleName)
            {
                case "cd.person:whenCreated<-mv.person:":
                    if (csentry["whenCreated"].IsPresent)
                    {
                        break;
                    }
                    else
                    {
                        csentry["whenCreated"].StringValue = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
                    }   
                       break;
                case "cd.person:whenUpdated<-mv.person:":
                csentry["whenUpdated"].StringValue = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
                break;
            }

-------------------------------------------------------------------------

concerning the "whencreated" there is no problem, but the issue is the "whenupdated", i want the field be updated only when onother field is updated, how to manage that ?


Viewing all articles
Browse latest Browse all 4767

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>