How can i edit a hard code of an button?
You need to give more information. What button are you talking about? Which document? What are you trying to do instead of the regular function?
Button “Save” of the New Payment Entry. Cause i have to add new selection(Employee) in Party Type. Party Type row is fetching “DocType”, but i don’t know how this fetching DocType and returning just “Supplier” and “Customer”. Then i created an new row, fetching Supplier, Customer and Employee, and another row linking this row to i select the Party. But when i try save the payment, this notify that i not select party(the default row). So i wanna access this hard code to change the party row to my new party row.
I’m having a bit of trouble understanding exactly what you’re trying to do, but you definitely don’t need to override the “Save” button to change the value of a field before you save.
You probably can use the add_fetch so that when one field gets entered, another field will be populated at the same time. Alternatively, you can use a before_save hook (in hooks.py) or frappe.ui.form.on("Payment Entry", "before_save", function (frm){})
in a custom script to make this work.
There are many good examples of each of these if you search the forums.
It’s the deal, let’s talk about another solution…
“For Links, enter the DocType as range” how can i configure this range?
I’m refering this:
This are fetching “DocType”
And returning just Fornecedor(Supplier) and Cliente(Customer)
Has some range hidded there… I need access to this range to add Employee too
Which document is this? There is probably a custom query on that field which prevents it from loading more than those two options.
Payment Entry, can i custom this?
As I see, Party
is Dynamic Link Which depends on Party Type``(Customer/Supplier)
selected. That Means if you select Customer in Party Type. Party will fetch the Customer’s same for the supplier.
Now if you want to fetch Employee
here just add Employee
option in Party Type
field.
Then just select Employee
in Party Type
it gives you Employee List
in Party
field.
Use Customize form for it.
I’m not sure, might be it affects the default flow. Try it
Good luck.
No, cause i can’t change party_type to Select.
“Fieldtype cannot be changed from Link to Select in row 10”
Please guys! I need your help…