Add element of enum PaymentTypes

Posted:
Tue Dec 13, 2022 2:03 pm
by DannyC
Currently there are 2 values in JiwaCreditorChqPay.CreditorChequePayment.PaymentTypes
namely Cheque and EFT.
I want to add another, BPay.
How can I do that?
Re: Add element of enum PaymentTypes 

Posted:
Tue Dec 13, 2022 2:51 pm
by SBarnes
In short I don't believe you can as an enum is a declared and compiled type, below is its declaration, but what are you actually trying to achieve as there might be another way?
- Code: Select all
Public Enum PaymentTypes
Cheque = 0
EFT = 1
End Enum
Re: Add element of enum PaymentTypes

Posted:
Wed Dec 14, 2022 8:19 am
by DannyC
what are you actually trying to achieve
I want to add another, BPay.
So I guess I want it to be something like
- Code: Select all
Public Enum PaymentTypes
Cheque = 0
EFT = 1
BPay = 2
End Enum
Re: Add element of enum PaymentTypes

Posted:
Wed Dec 14, 2022 8:35 am
by SBarnes
Well I don't believe you can, and technically BPay is an EFT at any rate.
The only other suggestion I can make to you is add a check box to the screen that can only be checked when EFT is picked and store the data in a custom field if available(I don't think it is) or add a table that links to the primary key of the business object and has a bit field called BPay. You would then need code on the events Read End, Created, Copy and Save Ending to do the necessary CRUD operations, you can use a cascading delete if the screen allows for delete to do the delete.