

I have action that want to link field. when I click it error like above


I have action that want to link field. when I click it error like above
Best answer by aleksandrsechin
If the Request Nbr field is read-only and has the PXSelector attribute, set the following properties:
Enabled="False"
AllowEdit="True"
Also remove the Command and Target properties.
And if the Request Nbr field is just a PXTextEdit, you can specify the Command="YourCommand" and Target="ds" properties, where YourCommand is an action defined like this:
public PXAction<PMRegister> YourCommand;
[PXButton]
[PXUIField]
public virtual IEnumerable yourCommand(PXAdapter adapter)
{
var graph = PXGraph.CreateInstance<RegisterEntry>();
graph.Document.Current = graph.Document.Search<PMRegister.refNbr>(Base.Document.Current?.Description, "PM");
throw new PXRedirectRequiredException(graph, true, null);
}

In my case, this allows opening the PM00002237 Project Transaction in a new tab by simply clicking the Description text field.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.