Set Property Dynamically


   Hello sir

                i want to add set property dynamically in to the database table tabDefaultValue for that i have written following code
        ab = Document(‘tabDefaultValue’)
                        ab.parentfield=‘system_default’
                        ab.parenttype=‘Control Panel’
                        ab.parent=self.doc.name
                        ab.defkey=‘Store’
                        ab.defvalue = self.doc.store
                        ab.save(new=1)
 
  But it gives an error
          (1146, “Table ‘mtn_erp.tabtabDefaultValue’ doesn’t exist”)
 So please help me to solve this problem.

Thanx & Regards
Rohit




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/lWQT_E0ZOZEJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

DefaultValue is a child table of "Profile", not "Control Panel". And doctype name is "Default Value", table is "tabDefault Value".

Regards,
Nabin Hait

On 22-Mar-2013, at 12:39 PM, Rohit Waghchaure wrote:


   Hello sir

                i want to add set property dynamically in to the database table tabDefaultValue for that i have written following code
        ab = Document('tabDefaultValue')
                        ab.parentfield='system_default'
                        ab.parenttype='Control Panel'
                        ab.parent=self.doc.name
                        ab.defkey='Store'
                        ab.defvalue = self.doc.store
                        ab.save(new=1)
 
  But it gives an error
          (1146, "Table 'mtn_erp.tabtabDefaultValue' doesn't exist")
 So please help me to solve this problem.

Thanx & Regards
Rohit





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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/lWQT_E0ZOZEJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Please use webnotes.defaults module to get / set defaults.


W: https://erpnext.com
T: @rushabh_mehta

On 22-Mar-2013, at 12:45 PM, Nabin Hait <na...@gmail.com> wrote:

DefaultValue is a child table of "Profile", not "Control Panel". And doctype name is "Default Value", table is "tabDefault Value".

Regards,
Nabin Hait

On 22-Mar-2013, at 12:39 PM, Rohit Waghchaure wrote:


   Hello sir

                i want to add set property dynamically in to the database table tabDefaultValue for that i have written following code
        ab = Document('tabDefaultValue')
                        ab.parentfield='system_default'
                        ab.parenttype='Control Panel'
                        ab.parent=self.doc.name
                        ab.defkey='Store'
                        ab.defvalue = self.doc.store
                        ab.save(new=1)
 
  But it gives an error
          (1146, "Table 'mtn_erp.tabtabDefaultValue' doesn't exist")
 So please help me to solve this problem.

Thanx & Regards
Rohit





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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/lWQT_E0ZOZEJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Sorry, "DefaultValue" is linked to both "Control Panel" and "Profile"

Regards,
Nabin Hait

On 22-Mar-2013, at 12:48 PM, Rushabh Mehta wrote:

Please use webnotes.defaults module to get / set defaults.


W: https://erpnext.com
T: @rushabh_mehta

On 22-Mar-2013, at 12:45 PM, Nabin Hait <na...@gmail.com> wrote:

DefaultValue is a child table of "Profile", not "Control Panel". And doctype name is "Default Value", table is "tabDefault Value".

Regards,
Nabin Hait

On 22-Mar-2013, at 12:39 PM, Rohit Waghchaure wrote:


   Hello sir

                i want to add set property dynamically in to the database table tabDefaultValue for that i have written following code
        ab = Document('tabDefaultValue')
                        ab.parentfield='system_default'
                        ab.parenttype='Control Panel'
                        ab.parent=self.doc.name
                        ab.defkey='Store'
                        ab.defvalue = self.doc.store
                        ab.save(new=1)
 
  But it gives an error
          (1146, "Table 'mtn_erp.tabtabDefaultValue' doesn't exist")
 So please help me to solve this problem.

Thanx & Regards
Rohit





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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/lWQT_E0ZOZEJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.