can any one help me how to assign default values to fields o

Posted by Sudhakar on 09-May-2014 13:46

Hi All,

i am able show default field in onload event but the values are not showing in view/edit page.

Can any one help me how can i store values into DB. PFA SS for better understand.


As shown SS i am able to show default values in city field by using page load script But after saving the record the the values showed in New employee are are not showing in View/Edit page.

can any one help me out on the issue.

Thanks,
Sudhakar.

All Replies

Posted by Santosh Patel on 11-May-2014 07:05

Hi Sudhakar,

I suppose you are setting the field to 'Read Only' in the New Page without the field having a default value set on it's properties. Ideal way would be to set the default value by Editing the field definition (be it a string, integer or picklist field). Doing so would ensure that when the record is created the default value will be set.

If however, you require different values based on some condition to be set when creating the record, setting the read only field on the New page would result in the field not being part of the form submit to create the record. You would need to add a hidden field that would carry the default value. Set the hidden field with name as integration name of the field and value as applicable.

Let me know if you experience any technical snag with implementing this.

Regards,

Santosh

Posted by Sudhakar on 12-May-2014 11:10

Thanks [mention:7e24e60fbecc4ff8baf4669a65bae0a0:e9ed411860ed4f2ba0265705b8793d05] ,

The value what i have shown to you is done by using "rbf_setFieldContent("city", "Hyd");"(Written in Script page load) .

why bcz according to my requirement if a record is created from portals then only i want to show city value as HYD ,if a record is created in general way  it has to show the value selected by user.

Thanks.

Sudhakar.

This thread is closed