Hi All,
Is it possible to create a lfe's link in a windows' folder using workflow?
If yes, how can I do?
Thanks a lot.
Regards
Hi All,
Is it possible to create a lfe's link in a windows' folder using workflow?
If yes, how can I do?
Thanks a lot.
Regards
Do you mean the lfe link that is created as an email attachment in workflow? Or do you mean you want to create a document shortcut in a different folder?
Hi Jennifer,
Thank you for your return.
I means the link created as an email attachment.
Using SDK, I can create a lfe's file in windows. I can populate this file too.
But idk how to get the name and the id.
namespace WorkflowActivity.Scripting.Créerunlienlfe
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using Laserfiche.RepositoryAccess;
/// <summary>
/// Provides one or more methods that can be run when the workflow scripting activity is performed.
/// </summary>
public class Script1 : RAScriptClass102
{
/// <summary>
/// This method is run when the activity is performed.
/// </summary>
protected override void Execute()
{
//string s = "\"" + GetTokenValue("PourChaqueResultat_CurrentEntry_ID") + "\"";
string token_id = "\"" + GetTokenValue("MyToken_token_id") + "\"";
// set a path to write to. run the workflow on a schedule and overwrite the file
//string fpath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),@"CSV\\");
string fpath = "D:\\Alerte Popup Laserfiche\\";
if(!System.IO.Directory.Exists(fpath))
System.IO.Directory.CreateDirectory(fpath);
fpath = System.IO.Path.Combine(fpath, token_id + ".lfe");
// create a token or update one if you added an Assign Tokens activity
SetTokenValue("csvpath", fpath);
// best to use full csv unless you are absolutely certain that the values will not have any special characters like semicolon and double quotes
//System.IO.File.WriteAllText(fpath, "\"ID\";\"Nom\";\"PO Number\"" + Environment.NewLine);
System.IO.File.WriteAllText(fpath, "<?xml version='1.0' encoding='Unicode'?>" + Environment.NewLine + "<laserfiche>" + Environment.NewLine + "<repository name='varkit'>" + Environment.NewLine + "<entry id='7963' />" + Environment.NewLine + "</repository>" + Environment.NewLine + "</laserfiche>");
}
}
}
I have this error
(means the token "MyToken_token_id" doesnt exist)
Can you put a Find Entry activity in the workflow to find the entry first then have those fields available as token for the script?
Hi Jennifer,
It's ok, I found myself. I wrote the object's name until the token's name.
We can close this topic.
Thank you very much.
Regards