使用带有 callto 链接的按钮

问题描述 投票:0回答:1

我想优化下面的代码,因为 acumatica 在调用 callto 函数时会打开一个新窗口。 我想只执行 callto 而不打开新窗口?

  [PXUIField(DisplayName = "Tel1",
  MapEnableRights = PXCacheRights.Select,
  MapViewRights = PXCacheRights.Select)]
  [PXButton(ImageKey = PX.Web.UI.Sprite.Main.World)]

  protected virtual IEnumerable tel1 (PXAdapter adapter)
  {
    string tel1="callto:06XXXXXXXX";        
    throw new PXException("Redirect4:"+string.Format(tel1));
    return adapter.Get();
  }    

我不希望有 about:blank,但我希望只有 3CXPhone 窗口。

acumatica
1个回答
0
投票

我使用以下代码在 AP301000 上添加一个按钮,该按钮重定向到“callto:”打开您设置的任何关联程序(我打开的团队)进行网络呼叫。

public class AAAPInvoiceEntry_Redirect : PXGraphExtension<APInvoiceEntry>
{
    public PXAction<APInvoice> AATel1;

    [PXUIField(DisplayName = "Tel1", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
    [PXButton(CommitChanges = true)]
    public virtual IEnumerable aAtel1(PXAdapter adapter)
    {
        string tel1 = "callto:06XXXXXXXX";
        throw new Exception("Redirect0:" + string.Format(tel1));
    }
}
© www.soinside.com 2019 - 2024. All rights reserved.