public void OnLink(Link link, CancelUpdateArgument arg)
        {
            if (!link.LinkType.Id.Equals("ProductItem"))
            {
                Context.Log(inRiver.Remoting.Log.LogLevel.Information, $"This is a productItem");

                return;
            }

            Entity item            = Context.ExtensionManager.DataService.GetEntity(link.Target.Id, LoadLevel.DataOnly);
            Field  itemStatusField = item.GetField("ItemStatus");

            if (itemStatusField == null || itemStatusField.IsEmpty() || itemStatusField.Data.ToString().Equals("new"))
            {
                Context.Log(inRiver.Remoting.Log.LogLevel.Information, $"This was is new. decline!");
                arg.Cancel  = true;
                arg.Message = "No Link possible for status new";
            }
            Context.Log(inRiver.Remoting.Log.LogLevel.Information, $"This was not a new product.");
        }
Beispiel #2
0
 public void OnAdd(Entity entity, CancelUpdateArgument arg)
 {
     //
 }
Beispiel #3
0
 public void OnUnlock(Entity entity, CancelUpdateArgument arg)
 {
     //
 }
Beispiel #4
0
 public void OnCreateVersion(Entity entity, CancelUpdateArgument arg)
 {
     //
 }
Beispiel #5
0
 public void OnUnlink(Link link, CancelUpdateArgument arg)
 {
     //
 }
Beispiel #6
0
 public void OnLinkUpdate(Link link, CancelUpdateArgument arg)
 {
     //
 }
Beispiel #7
0
 public void OnDelete(Entity entity, CancelUpdateArgument arg)
 {
     //
 }
 public void OnUpdate(Entity entity, CancelUpdateArgument arg)
 {
 }