Custom script does not work on live system

59 views
Skip to first unread message

Kat

unread,
Feb 6, 2014, 2:30:44 AM2/6/14
to erpnext-dev...@googlegroups.com
Hello there,

I have a custom script that works fine on my ERPNext virtual machine but when I put on the live system it does not work.
It does not allow me to save the customer form.

Here is sample of the script http://pastebin.com/S9GSP4Eq

Your help will be greatly appreciated.

Regards,
Kat

lxnow

unread,
Feb 6, 2014, 4:28:12 AM2/6/14
to erpnext-dev...@googlegroups.com
Not an expert, but shouldn't there be semi-colon at the end of the msgprint line and doc.branch_code = 'City 4013'?

like doc.branch_code = 'City 4013';

Anand Doshi

unread,
Feb 6, 2014, 5:02:44 AM2/6/14
to Kat, erpnext-dev...@googlegroups.com
Hi Kat,

Seems like the Custom Fields may not be existing in your live system.

Best,
Anand Doshi.
> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us
> as much information as you can. Please see it from the point of
> view of the person receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com
> and send only the URL via email
> 3. For sending images, use http://imgur.com or other similar
> services. Do not send images as attachments. Links are good.
> Same goes for any file you are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google
> Groups "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to erpnext-developer...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/18e34f74-eb08-4947-90d0-e195c027d52c%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

Kat

unread,
Feb 6, 2014, 6:35:29 AM2/6/14
to erpnext-dev...@googlegroups.com, Kat
Hi Anand,

The fields exist in the live system but once I put the scripts live, well no way to save the form (the customer form).

Kat

unread,
Feb 6, 2014, 6:36:06 AM2/6/14
to erpnext-dev...@googlegroups.com
Hi Lxnow,

Actually you are right, statements should end with a ;.

Thank you.

Anand Doshi

unread,
Feb 6, 2014, 7:44:48 AM2/6/14
to erpnext-dev...@googlegroups.com
Try after clear cache and refresh

Sent from phone
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/77fb77ec-5928-49c8-a8a0-77b754ed7642%40googlegroups.com.

Kat

unread,
Feb 7, 2014, 6:25:05 AM2/7/14
to erpnext-dev...@googlegroups.com
Hi Anand,

I tried that still no good result.
The script are pretty simple I don't know why they don't work.

Thanks,
Kat.

Nabin Hait

unread,
Feb 7, 2014, 6:42:54 AM2/7/14
to erpnext-dev...@googlegroups.com
  1. if(doc.id_number != 13){
  2.            msgprint("ID number cannot be less than 13 characters long")
  3.         }

What do you want to check? If you want to validate number of characters in id number (>= 13 chars) as per message, then the condition should be: cstr(doc.id_number).length < 13

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/2b1b7d66-6d84-40d7-9320-4d910f6c5598%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages