使用现有重定向到外部 URL [英] Using the Existing Redirection to an External URL

查看:34
本文介绍了使用现有重定向到外部 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Acumatica mobile xml 或 msdl 上使用重定向来重定向到外部链接?

How do you use redirection on Acumatica mobile xml or msdl to redirect to an external link?

我所能找到的是,如果 Acumatica ERP 表单上的操作提供到外部 URL 的重定向,您可以映射该操作以在移动应用程序中使用它.为此,您不需要操作对象中的其他属性.但是,必须将标签的重定向属性设置为 True,如下例所示.

All I could find is If an action on an Acumatica ERP form provides redirection to an external URL, you can map the action to use it in the mobile app. To do this, you need no additional attributes in the action object. However, the redirect attribute of the tag must be set to True, as shown in the following example.

谢谢

推荐答案

可能还有其他方法,但是从 2018R2 中 MSDL 的新 T410 课程开始,您需要执行几个步骤.(在 2018 年 Acumatica 峰会网络服务课程 - 培训指南中的第 6 课中得到了这个,如果还没有的话,应该很快就会提供.)

There may be other ways, but from the new T410 course for MSDL in 2018R2, you need to do a couple of steps. (Got this at Acumatica Summit 2018 Web Services course - Lesson 6 in the training guide which should be available soon if not already.)

首先,在表单上为您的外部链接定义一个新的工具栏按钮(此示例针对 SO303000 屏幕)

First, define a new toolbar button on the form for your external link (This example is for the SO303000 screen)

public PXAction<AR.ARInvoice> TestURL;  

[PXButton(CommitChanges=true)]
[PXUIField(DisplayName = "TestURL")]

protected void testURL(){
    throw new PXRedirectToUrlException(
        "http://www.acumatica.com",
        "Redirect:http://www.acumatica.com"
    )
}

发布项目后,返回移动应用程序部分中的自定义项目以映射按钮.将此添加到页面的命令部分,如以下示例所示.

After publishing your project, go back to the Customization Project in the Mobile Application section to map the button. Add this to the commands section of the page as shown in the following example.

add container "InvoiceSummary" {
  add field …

  add recordAction "TestURL" {
    behavior = Void
    redirect = True
  }
}

不确定这是否回答了您的问题,因为您几乎已经列出了 MSDL 代码,所以也许这与您在移动定义中放置代码的位置有关?在培训课程中,我们将它放在我们想要链接的容器中,当查看该容器时,该链接会出现在移动应用程序的菜单上.

Not sure if this answered your question as you pretty much had the MSDL code listed, so maybe it is a matter of where you placed your code within the mobile definition? In the training class, we placed it inside the container where we wanted the link which then appears on the menu on the mobile app when viewing that container.

这篇关于使用现有重定向到外部 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆