UHF - Header

SBX - Search With Button

SBX - Forum Post Title

Urgent Help Please...!! Set discount reason code from add in

Microsoft Dynamics RMS Forum

Aadeel S. Puri asked a question on 24 Jun 2019 8:16 PM
My Badges

Urgent Help Please...!! Set discount reason code from add in

Unanswered

Dear RMS Pros,

I got stuck while set discount reason code on currententry, I've tried the following

QSRules.Transaction.Entries(EntryKey).SetDiscountReasonCode = 63

QSRules.Transaction.Entries(EntryKey).DiscountReasonCode.ReasonCode = RC //RC is reasoncode object

QSRules.Transaction.Entries(EntryKey).DiscountReasonCode.ReasonCode.ID = RC.ID

but somehow it is not able to set discount reason code at EntryKey

Please help.

Reply

Replies (2)

Michael Marmah responded on 25 Jun 2019 3:16 AM
My Badges

Urgent Help Please...!! Set discount reason code from add in

Unanswered

Hi Aedeel,

Which version of RMS  are you working with

I dont really get what you are trying to achieve but just looking at your code snippet you can try this


QSRules.Transaction.Entries(EntryKey).DiscountReasonCode = 63

QSRules.Transaction.Entries(EntryKey).DiscountReasonCode = RC //RC is reasoncode object

QSRules.Transaction.Entries(EntryKey).DiscountReasonCode.ID = RC.ID
Reply
Aadeel S. Puri responded on 25 Jun 2019 4:39 AM
My Badges

Urgent Help Please...!! Set discount reason code from add in

Unanswered

Dear i am using 2.0.2022,

I am developing HTML Add-In that controls transaction grid at POS, I need to apply discount by percentage on single entry from add in which i have succeed but now i also need to set discount reason code from add in as well on that particular entry item.

Above shared snippet is the variation in the code I've tried to set discount reason code as per customization guide. but still it is not able to set discount reason code.

Reply

SBX - Two Col Forum

SBX - Migrated JS