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

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute Method on the basis of flag

Ajeet
Contributor III

I have a custom object which creates an engagement  along with some values however user first need to select values and then save the selected values by clicking the save button then the  user hits the generate engagement button to create and copy the values to engagement. the requirement is updated like user should not click on the save button, the save content feature should be  available on the same button so that clicks can be reduced. when I try to call the save method before my engagement method the implementation is not working. can we implement this custom object like when user clicks on engagement custom button, first it should save the selected values and then it should continue with to create engagement? it would be great to share ideas and some example if any.

@Ilya.Khen @Ilya_Khen @Ilya.Khen @DavidPetty @JeffLetterman  @archer_scripts 

1 ACCEPTED SOLUTION

Accepted Solutions

DavidPetty
Archer Employee
Archer Employee

@Ajeet Typically this is what I do:

  1. Upon button click, set a storage session variable (Window sessionStorage Property)
  2. Save the record
  3. Upon the record reloading check for the session variable
    1. If found, clear it
    2. Call my post save functions.

 Advisory Consultant

View solution in original post

2 REPLIES 2

DavidPetty
Archer Employee
Archer Employee

@Ajeet Typically this is what I do:

  1. Upon button click, set a storage session variable (Window sessionStorage Property)
  2. Save the record
  3. Upon the record reloading check for the session variable
    1. If found, clear it
    2. Call my post save functions.

 Advisory Consultant

@DavidPetty  I tried it and it worked fine. thank you so much.