Solved

Unable to get the "FromCurrent" option to get the Current record infromation.

  • 18 April 2022
  • 7 replies
  • 83 views

Userlevel 4
Badge +1

Hi Guys, Hope you are doing great.

Could you please assist me on the below one:

I am saving FSServiceContract record noteID value in Agreements table - RefNoteID field for reference purpose. While constructing the DataView to get the matched records infromation from the Agreements (this DataView present inside the FSServiceContractExt Graph), I am unable to get theFromCurrent” option.

Below one is the my DataView:

  public SelectFrom<Agreements>.
        Where<Agreements.refNoteid.IsEqual<FSServiceContract.noteID.FromCurrent>>.

        View Agreements;

 

→ Unable to get “FromCurrent” in the above DataView.

Note: The noteID was defined like the below inside the FSServiceContract class.

        public abstract class noteID : IBqlField, IBqlOperand
        {
            protected noteID();
        }

 

Thanks in Advance.

Moulali Shaik.

icon

Best answer by Naveen Boga 18 April 2022, 13:45

View original

7 replies

Userlevel 7
Badge +17

Hi @MoulaliShaik79  The above VIEW syntax is correct. NOTE ID field is not identifying and hence FROMCurrent is not coming at all.

 

Can you please declare NOTEID  DAC field properly and verify.

 

Other syntax just for reference

  public Select<Agreements, Where<Agreements.refNoteid, Equal<Current<FSServiceContract.noteID>>>> Agreements;

 

 

Userlevel 4
Badge +1

Hi @Naveen Boga ,

 I had declared Noteid field like the below inside the Agreements DAC

       #region Noteid
        [PXNote()]
        public virtual Guid? Noteid { get; set; }
        public abstract class noteid : PX.Data.BQL.BqlGuid.Field<noteid> { }

        #endregion

 

With the below Sytax:

public Select<Agreements, Where<Agreements.refNoteid, Equal<Current<FSServiceContract.noteID>>>> Agreements;

 

I am getting the below error:

There is no implicit reference convertion from PX.Data.Current<PX.Objects.FS.FSServiceContract.NoteID> to PX.Common.IImplement<PX.Data.Bql.IBqlCastableTo<PX.Data.BQL.IBqlGuid»

 

 

 

Thanks,

Moulali Shaik.

 

 

 

Userlevel 7
Badge +17

Hi @MoulaliShaik79  Can you please share the Aggrements.cs DAC file here.

Userlevel 4
Badge +1

Hi @Naveen Boga 

Please find the attachment of Agreement.cs file.

 

 

 

Thanks,

Moulali Shaik.

Userlevel 7
Badge +17

Here is the issue @MoulaliShaik79 

Sorry, It was my bad, mentioned above wrong syntax. Please check with PXSELECT like below

 

      public PXSelect<Agreements, Where<Agreements.refNoteid, Equal<Current<FSServiceContract.noteID>>>> Agreements;

Userlevel 4
Badge +1

Hi @Naveen Boga ,

Thanks a lot for your help. It got resolved with below DataView which is provided by you:

 public PXSelect<Agreements, Where<Agreements.refNoteid, Equal<Current<FSServiceContract.noteID>>>> Agreements;

 

 

Thanks,

Moulali Shaik.

 

Userlevel 7
Badge +17

Thanks for sharing the update and You are most welcome  :) @MoulaliShaik79 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved