Bug in Custom Field

I have developed a bug in Custom Fields > Sales Invoice
It was initially fine but after adding a couple of fields, on the third field I was experimenting with Paypal link codes, then all parameters of the 2 existing fields became blank with option for dropdown and cant be saved. I cant add the third or anymore fields (eternal save wheel) and there is this code below the box:

"},“SalesQuoteNumber”:null,“ConversionBalance”:0.0,“RoundingMethod”:0,“DueDateType”:0,“DueDateDays”:null,“LatePaymentFeesPercentage”:null,“TdsRate”:null,“WithholdingTaxType”:0,“WithholdingTaxAmount”:null,“WithholdingTax”:false,“Rounding”:false,“InventoryLocation”:null,“Discount”:false,“DiscountType”:0,“CustomTheme”:false,“Theme”:null,“EarlyPaymentDiscount”:false,“EarlyPaymentDiscountType”:0,“EarlyPaymentDiscountRate”:0.0,“EarlyPaymentDiscountAmount”:0.0,“EarlyPaymentDiscountDays”:null,“DocumentHeader”:null,“LatePaymentFees”:false,“HasCustomTitle”:false,“AutomaticReference”:false,“TotalAmountInWords”:false,“HideDueDate”:false,“TotalAmountInBaseCurrency”:false,“PartialPayment”:false,“Key”:“ad12b60b-23bf-4421-94df-8be79cef533e”,“AbstractName”:“Sales Invoice”,“AbstractDescription”:null,“UniqueName”:“Sales Invoice”,“IsAccountsReceivable”:false,“IsAccountsPayable”:false,“IsCashAtBank”:false,“IsCashOnHand”:false,“IsInventoryOnHand”:false,“IsControlAccountForCapitalAccounts”:false,“IsEmployeeClearingAccount”:false,“IsControlAccountForSpecialAccounts”:false,“IsControlAccountForFixedAssets”:false,“IsControlAccountForFixedAssetsAccumulatedDepreciation”:false,“IsControlAccountForIntangibleAssets”:false,“IsControlAccountForIntangibleAssetsAccumulatedAmortization”:false,“HasCustomers”:false,“IsProfitAndLossAccount”:false},“UniqueName”:null,“IsAccountsReceivable”:false,“IsAccountsPayable”:false,“IsCashAtBank”:false,“IsCashOnHand”:false,“IsInventoryOnHand”:false,“IsControlAccountForCapitalAccounts”:false,“IsEmployeeClearingAccount”:false,“IsControlAccountForSpecialAccounts”:false,“IsControlAccountForFixedAssets”:false,“IsControlAccountForFixedAssetsAccumulatedDepreciation”:false,“IsControlAccountForIntangibleAssets”:false,“IsControlAccountForIntangibleAssetsAccumulatedAmortization”:false,“HasCustomers”:false,“IsProfitAndLossAccount”:false}, methods: { getDecimals: function() { return 2 },getBaseCurrencyCode: function() { return “AUD” } } })

I have deleted all of the fields but now I cant create any Sales Invoice custom fields. And it only happens with the Sales Invoice custom fields. I can still create others., including the Sales Invoice - Line fields.

What edition (desktop, server, or cloud)? What version number?

Can you illustrate this with screen shots? It is not clear what you mean.

Thanks Tut
Desktop version is 21.2.62

In the screenshot I posted above you can see that the “type” drop down is set to “single line text” yet the boxes below it are stuck as if type was set to “drop down list”. In fact I think my problems started when I started changing type to “drop down list”

What other screen shot do you suggest? As mentioned I have checked all the other custom fields (eg. Bank Account, Customer etc) and they all behave normally. As the Sales Invoice custom field initially did. It is still jammed up and I cant save or change anything.

It is a weird bug, I realise that you may not be able to reproduce it easily. It looks like a one-off case of a database has gotten corrupted. Question is what can I do about it? Re-import a backup? Re-install an older version?

When you are testing have your clipboard full with code, mine was full with a long script I copied from a Paypal checkout widget

@ben1 what exactly do you have in custom fields set under Form Defaults when viewing sales invoice? I will try to reproduce the issue that way.

The issue appears to be that HTML code in your custom field is not being properly escaped somewhere but I can’t figure out where yet.

As a test, you can go to Form Defaults and clear values from custom fields under Sales Invoice, then go to create or edit existing custom fields and it should work.

Thanks lubos
In form defaults I was trying to insert the paypal code in a new paragraph text custom field I set in Sales Invoices (when it was working) last night but as you can see now its gone.
I backed up, uninstalled manager and reinstalled the new version 21.2.73 and upon importing it took several minutes to import my very small file, only a couple hunder tansactions, started from scratch with no batch importing (I did do a few ofx imports tho)

I went back to a previous backup and that loaded way faster. So I think somehow it corrupted my company file (loosing several hours work). The company file was in my google drive, in a folder set to available offline (so still a local folder). I guess that could be the cause?

Now I am running the working file in an un-synced local folder not inside my google drive folder and from now on I will only store backups in google drive.

Do you know of anyone having issues like this when their working file resides in google drive? I realise that it cant be open in two places (mine wasnt)

Is there anyway of repairing my current company file so I can keep my work?

BTW, from my current corrupt backup even though you see there is no custom fields in form defautls, there was before but when I had the issue I deleted all my custom fields thus you dont see them anymore.

To just confirm your test, I double checked there was nothing in the default form, made a change (put a 1 in the address field), updated, went back to custom fields Sales Invoices and still the same unfinished html code is there and it cant save.

It it helps I was also playing around with the paragraph box sizes and position value around the time it got corrupted too. At one time the position value was the same for two custom fields before I changed it

@lubos I have PM’d my corrupt company backup file

Awesome, lubos fixed it with an updated version! Thanks for the quick response.

edit…sorry my post limit is up so I have edited this one…

@lubos I spoke too soon. I got to my third Custom Field and it worked for a while, but after playing around with html links, sizing etc something corrupted again an the third field would never show up when viewing the invoice. Although it was present in custom fields, form defaults and edit mode of the invoice. Just didnt show in invoice view mode.

For now I have a work around and added the link at the end of the second custom field.

One thing though, when exporting the PDF the url is no longer a link in the PDF it is just plain text (from the link text portion)

…edit the field wasn’t set to visible on printed docs…my bad…bug solved.

If you can send me your accounting file demonstrating the issue, I’ll have a look.