You are viewing limited content. For full access, please sign in.

Question

Question

All created retention values retrieval in laserfiche forms or sdk

asked on March 5, 2022

Hello Sir,

We have created some retention schedule in LF administration and we want that all retention name into my Laserfiche form.

We are using the cloud environment where we needed all values of retention fill as a dropdown values.

Is there any SDK method or function available or any way to get all the retention either in laserfiche forms or inside workflow.

Thanks,

Pratik   

 

 

0 0

Replies

replied on March 7, 2022

The values can be queried from the repository database.  They are in the disp_sched table.

0 0
replied on March 7, 2022

Hello ,

Is it worked for cloud environment ? How we would apply query in repository database within cloud ? 

Thanks,

Pratik 

 

0 0
replied on March 7, 2022

I don't know we're running hosted.

0 0
replied on March 15, 2022

I did find a EnumAll method within the DispositionSchedule class in the SDK which should let you get all of the retention schedules that are configured in the repository.
 

If you also want to get other administrative records management items, such as the cutoff instructions or events, you can take a look at the RepositoryAccess.Records namespace in the SDK documentation for all the available options

 

Code sample as below:

 

string serverName = Convert.ToString(ConfigurationManager.AppSettings["LFServer"]).Trim();
                string repoName = Convert.ToString(ConfigurationManager.AppSettings["LFRepository"]).Trim();
                string username =Convert.ToString(ConfigurationManager.AppSettings["LFUserName"]).Trim();
                string password = Convert.ToString(ConfigurationManager.AppSettings["LFPassword"]).Trim();
                string LFVolume = Convert.ToString(ConfigurationManager.AppSettings["LFVolume"]).Trim();

                // log into the repository
                RepositoryRegistration repository = new RepositoryRegistration(serverName, repoName);

              
                session.LogIn(username, password, repository);

                Laserfiche.RepositoryAccess.Records.DispositionScheduleInfoReader objInfoReader  = Laserfiche.RepositoryAccess.Records.DispositionSchedule.EnumAll(session);

                string strTitleValues = "";

                foreach (Laserfiche.RepositoryAccess.Records.DispositionScheduleInfo retentionval in objInfoReader  )
                {
                    strTitleValues = strTitleValues + retentionval + "\r\n";
                }

 

1 0
replied on March 15, 2022

please change 

 

  strTitleValues = strTitleValues + retentionval + "\r\n";

 

to 

 

  strTitleValues = strTitleValues + retentionval.Name + "\r\n";

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.