Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom object to update a field, save record and run data feed directly from Form

DevanshiTiwari
Contributor II

I am using custom object to run a datafeed directly from the form.

 

For the datafeed report I want to provide a value list field that will uniquely identify the current record. In the code to run the datafeed, I want to first update a valuelist, save the record and then run the datafeed. But as soon as I save the form, further code is not executed and form comes back to the edit state. Hence, data feed is not running.

 

Looking for some suggestions. Any other solution to achieve the objective will be appreciated.

 

Thanks!

5 REPLIES 5

Arun.Prasad
Advocate II

Hi Arun,

 

Thanks for the help. These links are helpful but as soon as I am saving the form further code does not get executed. Form comes back to the initial stage. Hence, data feed is not running.  

Devanshi Tiwari‌,

 

Yes, once the save (apply) command is executed, the form reloads and the scope of CO ends when the page is reloaded. You might have to play with calculated fields to accomplish your objective.

Devanshi, you have to create a cookie or session storage (Window sessionStorage Property) before you do a save and then have the custom object check for the cookie/session storage and then clear cookie/session storage and perform your data feed call.

 Advisory Consultant

AnandThonta1
Contributor III

Hi Devanshi, 

I am facing similar issue. Did you get it working? if so, would you mind sharing your input. thanks, Anand