Skip to main content
Answer

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

  • April 18, 2022
  • 7 replies
  • 112 views

Forum|alt.badge.img+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.

Best answer by Naveen Boga

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;

7 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • April 18, 2022

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;

 

 


Forum|alt.badge.img+1
  • Author
  • Semi-Pro II
  • April 18, 2022

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.

 

 

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • April 18, 2022

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


Forum|alt.badge.img+1
  • Author
  • Semi-Pro II
  • April 18, 2022

Hi @Naveen Boga 

Please find the attachment of Agreement.cs file.

 

 

 

Thanks,

Moulali Shaik.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • April 18, 2022

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;


Forum|alt.badge.img+1
  • Author
  • Semi-Pro II
  • April 18, 2022

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.

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • April 18, 2022

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