Skip to main content
Solved

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

  • Apr 18, 2022 10:20 AM UTC
  • 7 replies
  • 163 views
  • Translate All

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 the “FromCurrent” 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;

View original

7 replies

Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Apr 18, 2022 10:32 AM UTC

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;

 

 

Translate

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

 

 

 

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Apr 18, 2022 11:11 AM UTC

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

Translate

Forum|alt.badge.img+1

Hi @Naveen Boga 

Please find the attachment of Agreement.cs file.

 

 

 

Thanks,

Moulali Shaik.

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Answer
  • Apr 18, 2022 11:45 AM UTC

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;

Translate

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

 

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Apr 18, 2022 12:45 PM UTC

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

Translate