これにCallContext.Propertiesを使用できます。 E10.0において
CallContext.Properties型Epicor.Utilities.PropertyBagであった、とアイテムは、以下のようにアクセスされる:
//Add
CallContext.Properties.Add("LineRef", LineRef);
// Get
var LineRef = (string)CallContext.Properties["LineRef"];
// Remove
CallContext.Properties.Remove("LineRef");
E10.1 CallContext.Propertiesは型にSystem.Collectionsの今です。 Concurrent.ConcurentDictionaryは.Net組み込み型であり、はるかに優れています。 ContextBoundBaseから継承し、唯一のコンテキストバインドのコンストラクタを実装する必要があるか、'Ice.ContextBoundBase<Erp.ErpContext>.ContextBoundBase()' is obsolete: 'Use the constructor that takes a data context'
public partial class MyInvokeExternalMethodThing : ContextBoundBase<ErpContext>
{
public MyInvokeExternalMethodThing(ErpContext ctx) : base(ctx)
{
}
を取得します。このクラスを使用するには
//Add
bool added = CallContext.Properties.TryAdd("LineRef", LineRef);
// Get
var LineRef = (string)CallContext.Properties["LineRef"]; //Note: Do not use .ToString() this converts instead of unboxing.
// Remove
object dummy;
bool foundAndRemoved = CallContext.Properties.TryRemove("LineRef", out dummy);
:しかし、それからエントリを追加および削除する方法は、以下のような変更を持っています
E10.1では、これに任意の種類のオブジェクトを入れることができるので、文字列の配列を持っているならば、〜の値の古いトリックを使う必要はありません。
CurrentCallContext.CurrentUserの使い方を知っていますか?私は、更新を行ったユーザーを格納するための更新メソッドで、前処理BPMを持っています。現在のところ、私はなぜ、それはちょうどデータを挿入しないのか分からない。私はEpicorの文書を見て、運がなかった。私はE10を使用しています –
この答えにコメントとして追加するのではなく、これを別の質問として尋ねる必要があります。 [epicorerp]でタグ付けし、あなたの質問に使用しているEpicor ERPのバージョンを言及してください。 –