function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SarisfdcSarisfdc 

how to us @Remoteaction feature

Hi,

I have a requirnment where I have to select an image on Visualforce page then Crop it in fixed size and then save as attacment in the record.
In visualforce I am filling record field valueas as well as image(attachment). On click of save button I want to save record first then save the selected image as atttachment. 

I have used javascript to crop the image and using <input> and <canvas> tag i am creating my image and try to save it by using @RemoteAction feature.

Here my issue is on click of Save First I want to save the record and then in the same method I want to call the saveimage methood (@remoteaction). But i am not able to call @remoteaction in my void save method.

Please advise