Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object for automatic saving

AkshayDaniel
Contributor III

Hi Everyone,

 

We have a requirement wherein when a user clicks on to create new record it should be saved automatically saved via a custom object after the record is finished loading. The idea behind it is that there are few xRef values that the user needs at the initial stages of the process, so thought of this approach if there is another way by which we can make the xRef prepopulate and without user having to click on save themselves at launch please do share, we are currently on version 6.4

1 ACCEPTED SOLUTION

Accepted Solutions

Ilya_Khen
Champion III

Akshay, for saving just launch $('#master_btnApply').click() in Sys.Application.add_load or $(document).ready based on a First Published being empty, let us say.

View solution in original post

6 REPLIES 6

Ilya_Khen
Champion III

Akshay, for saving just launch $('#master_btnApply').click() in Sys.Application.add_load or $(document).ready based on a First Published being empty, let us say.

Arun.Prasad
Advocate II

Akshay,

There are cons to your implementation (automatic save on record load). If someone clicks on "New" button within a record or "Add New Record" from the mega menu unintentionally, it will create new records and gets saved. You might end up with more unwanted records.

Hi Ilya,

 

Thank you for sharing the code works like a charm!! 

Akshay Daniel‌, also be aware that if there's required fields the record won't save till they are populated.

 Advisory Consultant

Hi IIya,

 

Would you mind sharing the full code for the save record custom object? I am attempting to save a record to calculate a helper field to make fields required. 

 

Thank you!

Hi Jennifer,

 

Basically, that depends on when you need to save record, then $('#master_btnApply').click() to be triggered.

E.g. If I need to save record per HTML button click:

<input type="button" name="CustomSave" value="Save Me" onclick="$('#master_btnApply').click();">