Skip to main content

Hi,

I have a new tab Called ‘Discount’ in my custom screen. In the grid level of this tab, I need to set values taken from ‘Discounts’ screen under the Profiles of Receivables workspace. First I set pxselector to DiscountCode field to set the value  DiscountSequence.DiscountID. Then I need to set Sequence ID related to the discountID which already set. 

To set SequenceId from DiscountSequence.SequenceID, I defined pxselector for sequence id like below.

pPXSelector(typeof(Search<DiscountSequence.discountSequenceID, Where<DiscountSequence.discountID, 
Equal<Current<APProformaDiscount.discountCode>>>>))]

ref: APProformaDiscount is the DAC for the Discount Tab.

but when click on selector, it shows nothing even there is a sequence Id for each discount code.

can someone help me to resolve this issue please?

thank You.

 

Hi @oshadarodrigo64  It seems you are getting NULL value from the WHERE condition (Highlighted below)

 

pPXSelector(typeof(Search<DiscountSequence.discountSequenceID, Where<DiscountSequence.discountID, Equal<Current<APProformaDiscount.discountCode>>>>))]

 

Have you checked by removing the WHERE condition and able to load the values?


Hi @oshadarodrigo64 ,

Could you please try below code in DAC for PXSelector?

ePXSelector(typeof(Search<DiscountSequence.discountSequenceID, Where<DiscountSequence.isActive, Equal<True>, And<DiscountSequence.discountID, Equal<Current<APProformaDiscount.discountID>>>>>))]

 >PXForeignReference(typeof(FK.DiscountSequence))]

Hope, it helps!

Regards,

Sweta


Hi @Naveen Boga ,

Thank you for the response, Yes I have tested without where condition and then it loads values without any issue, but with the where condition it shows nothing.

Hi @sweta68 ,

Thank you for the response, I will test your solution and let you know.


Just for confirmation: If you press the Refresh button on the selector, does it load with records even when it was initially blank?  If so, you might need to set AutoRefresh=True in the screen editor for the column/field.

And make sure the property SyncPosition=True on your grid.


Hi  @oshadarodrigo64  Yes that is the problem. WHERE condition is not refreshing/not fetching the value.

As indicate by Django, we need to the Auto Refresh =”True” as we are using the WHERE condition like below.

 

 

Hope this helps!


@Django , @Naveen

Thank you for your suggestion, but I cannot find AutoRefresh property for sequenceID field. is this because of it’s a custom field?


@oshadarodrigo64  No. It should be available for Custom field as well.

Just sharing a screenshot for your reference.

 

 


hi @sweta68 ,

I tested your solution but issue remained the same. Didn’t work as expected. Any idea you have ?


Hi all,

@oshadarodrigo64 , could you share the code of APProformaDiscount DAC, it seams like custom table, I can not find it in Acumatica.

Also check data in DB, two columns (APProformaDiscount.discountID and DiscountSequence.discountID) in tables must have the same values, at list one value must be the same, if you want to see value in selector.

It looks that DiscountSequence table doesn’t have row where DiscountID =”TEST” (according you screenshot)


HI @andriikravetskyi35 ,

sorry for being late to reply.

APProformaDiscount is a custom table and the code is attached herewith. thank you.


Reply