Skip to main content

Hi, Good Night.

 

I need to "reload" my "VendorId" selector with the corresponding information from my EstimateNbr (Header) and Id (Grid).

 

Currently in my DAC (corresponding to the grid: CEEstimateEstimate) I do the following in the VendorId.

  • I use CEEstimate.EstimateNbr FromCurrent. (header)
  • I use CEEstimateEstimate.Id From Current (grid)
    #region VendorId
PXDBInt()]
///PXDefault(TypeCode.Decimal,"0")]

PXSelector(typeof(Search<V_CEVendors.vendor_Id, Where<V_CEVendors.estimateNbr,Equal<CEEstimate.estimateNbr.FromCurrent>,And<V_CEVendors.idEstimateEstimate,Equal<CEEstimateEstimate.id.FromCurrent>>>>),
typeof(V_CEVendors.vendor_Id),
typeof(V_CEVendors.vendor_Name),
SubstituteKey = typeof(V_CEVendors.vendor_Id))]
PXUIField(DisplayName = "Vendor Id")]
public virtual int? VendorId { get; set; }
public abstract class vendorId : PX.Data.BQL.BqlInt.Field<vendorId> { }
#endregion

It works, but I must select the field next to it (it must be a selector as well) so that when passing to the same selector "VendorId" (in any row) it brings me the corresponding information of that PhaseCode.

For the VendorId selector to bring up the information corresponding to the EstimateNbr and Id I must click the AccountGroup selector and then click VendorId, otherwise the VendorId selector is not updated.

 

I need: not to click on a selector next to it so that my VendorId selector is refreshed, but when clicking on the selector itself it automatically loads the information corresponding to the EstimateNbr (Header) and Id (Grid)

 

Aditional. Is a project customization.

 

I hope I explained myself correctly, please help.

 

I’m not completely sure I understand what you are asking, but I think it is similar to how changing a vendor selector refreshes the vendor locations selector automatically.

If I understand this right, you need to do 2 things.  First, on any field that needs to drive an immediately visible change in the interface, remember to set CommitChanges = True.  This will push the new value into the cache so that the selector can respond accordingly.  In your case, I think this is both CEEstimate.estimateNbr and CEEstimateEstimate.id.

Next, you need to set AutoRefresh on the selector so that it does not require manually refreshing when you open it.  In your case, I think this is the vendorID field.

 

 


Hi @brianstevens  a lot of thanks for your help.

 

I will explain my problem in detail

I need my selector (Vendor_Id) to be updated through the values ​​of EstimateNbr (header) and the current row of the grid (Id).

If I expand the selector at id 30 the selector must refresh and show me the values ​​of the EstimateNbr and the selected row (Id = 30) if I select another row of the grid (Id = 33) the grid must refresh and show the corresponding information.

 

 

This is my DAC Code selector. (It works but no refresh de grid automatically)

    aPXSelector(typeof(Search5<BAccount.bAccountID,
LeftJoin<V_CEVendors,
On<BAccount.bAccountID,
Equal<V_CEVendors.vendor_Id>>>,
Where<V_CEVendors.estimateNbr.IsEqual<CEEstimate.estimateNbr.FromCurrent>.
And<V_CEVendors.idEstimateEstimate.IsEqual<CEEstimateEstimate.id.FromCurrent>.And<BAccount.type.IsEqual<SQLConstant.ONLYVENDORC>.And<BAccount.deletedDatabaseRecord.IsEqual<SQLConstant.DELETEDRECORDBOOLC>>>>.
Or<V_CEVendors.idEstimateEstimate.IsNull.And<BAccount.type.IsEqual<SQLConstant.ONLYVENDORC>.And<BAccount.deletedDatabaseRecord.IsEqual<SQLConstant.DELETEDRECORDBOOLC>>>>

>//.AggregateTo<GroupBy<BAccount.bAccountID>>//,OrderBy<Asc<BAccount.bAccountID>>
,Aggregate<GroupBy<BAccount.bAccountID, GroupBy<BAccount.acctName,GroupBy<V_CEVendors.idEstimateEstimate, GroupBy<V_CEVendors.vchecked, GroupBy<V_CEVendors.total>>>>>>
>
),
typeof(BAccount.bAccountID),
typeof(BAccount.acctName),
typeof(V_CEVendors.idEstimateEstimate),
typeof(V_CEVendors.vchecked),
typeof(V_CEVendors.total),
SubstituteKey = typeof(BAccount.acctName),
Filterable = true
)]

I use CEEstimate.EstimateNbr.FromCurrent (Header) and CEEstimateEstimate.Id.FromCurrent (Grid)

 


Reply