Skip to main content
Solved

Approvals GI


Forum|alt.badge.img

I am looking to add hyperlinks to the below highlighted field in a GI similar to the Approvals screen:
 


How can I achieve this?

Best answer by aaghaei

@harshita53

 

Approvals screen relies on the RefNoteID.

You must have the NoteID of those master records you want to navigate to in a field let say RefNoteID with special properties as follows:

public new abstract class refNoteID : PX.Data.BQL.BqlGuid.Field<refNoteID> { }
[PXRefNote(BqlTable = typeof(DACHoldingTheRefNoteID), LastKeyOnly=true)]
[PXUIField(DisplayName = "Reference Nbr.")]
[PXNoUpdate]
public override Guid? RefNoteID
{
	get
	{
		return this._RefNoteID;
	}
	set
	{
		this._RefNoteID = value;
	}
}

Then you will need a special action button to navigate to the underlaying parent record. 

public PXAction<EPOwned> EditDetail;
[PXUIField(DisplayName = "", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
[PXEditDetailButton]
public virtual IEnumerable editDetail(PXAdapter adapter)
{
    // Perform any required validations
    PX.Data.EntityHelper helper = new PX.Data.EntityHelper(YourGraph);

    // More validations and manipulation if needed
    helper.NavigateToRow(YourView.Current.RefNoteID.Value, PXRedirectHelper.WindowMode.InlineWindow);

    return adapter.Get();
}

 

It will do the work. The Key to it is to have the NoteID of the Record you want to navigate to in a Note type field i.e. RefNoteID.

 

AND this can not be done in GI. You will need a custom screen to simulate the GI

View original
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img

Hi @harshita53 

Hope you are doing good.

You need to add the main tables in your GI, so for the Purchases it will need to come from the POOrder table and the Sales Orders will need to come from the SOOrder table.

Kind Regards

Marilize


Forum|alt.badge.img
  • Author
  • Varsity I
  • 24 replies
  • December 6, 2023
marilizevanzyl wrote:

Hi @harshita53 

Hope you are doing good.

You need to add the main tables in your GI, so for the Purchases it will need to come from the POOrder table and the Sales Orders will need to come from the SOOrder table.

Kind Regards

Marilize

Hey @marilizevanzyl ,
I went through the DAC Schema Broswer of the Approvals (EP503010) screen, but didn’t find anything related to the POOrder & SOOrder tables. And the form still has the hyperlink included:
 

 


Also, is has an individual base DAC of EPApproval, and doesn’t have anything related to PO & SO tables. & now checking how they have added the hyperlink in the Approvals (EP503010) form for the Reference Nbr. column..
 


Forum|alt.badge.img
  • Author
  • Varsity I
  • 24 replies
  • December 6, 2023

Also, any ideas on how can i split the Reference Nbr in the GI? Currently it shows in the format of {Order Type, Order Nbr.}
I am looking to just display the Order Nbr.


Forum|alt.badge.img

Not sure, because using a Left or Right formula might still not give you the answer and then the hyperlink won’t work because of it then been a formula.

 


dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • 648 replies
  • December 6, 2023

The join will be on the Purchase Order/Sales Order using the RefNoteID (EPApproval) and NoteID on the POOrder/SOOrder

 

This will allow you to get to the tables and then add the RefNbr(s) (one column for Sales Order and one for Purchase Order) and they can be the hyperlinks. 


aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 1206 replies
  • Answer
  • December 7, 2023

@harshita53

 

Approvals screen relies on the RefNoteID.

You must have the NoteID of those master records you want to navigate to in a field let say RefNoteID with special properties as follows:

public new abstract class refNoteID : PX.Data.BQL.BqlGuid.Field<refNoteID> { }
[PXRefNote(BqlTable = typeof(DACHoldingTheRefNoteID), LastKeyOnly=true)]
[PXUIField(DisplayName = "Reference Nbr.")]
[PXNoUpdate]
public override Guid? RefNoteID
{
	get
	{
		return this._RefNoteID;
	}
	set
	{
		this._RefNoteID = value;
	}
}

Then you will need a special action button to navigate to the underlaying parent record. 

public PXAction<EPOwned> EditDetail;
[PXUIField(DisplayName = "", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
[PXEditDetailButton]
public virtual IEnumerable editDetail(PXAdapter adapter)
{
    // Perform any required validations
    PX.Data.EntityHelper helper = new PX.Data.EntityHelper(YourGraph);

    // More validations and manipulation if needed
    helper.NavigateToRow(YourView.Current.RefNoteID.Value, PXRedirectHelper.WindowMode.InlineWindow);

    return adapter.Get();
}

 

It will do the work. The Key to it is to have the NoteID of the Record you want to navigate to in a Note type field i.e. RefNoteID.

 

AND this can not be done in GI. You will need a custom screen to simulate the GI


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings