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
kavya mareedukavya mareedu 

How to convert Javascript button to Lightning

var url = parent.location.href;
var records = {!GETRECORDIDS($ObjectType.Opportunity)};
var updateRecords = [];

if (records[0] == null) { //if the button was clicked but there was no record selected
alert("Please select at least one record to update."); //alert the user that they didn't make a selection
} else { //otherwise, there was a record selection
for (var a=0; a<records.length; a++) { //for all records
var update_Opportunity = new sforce.SObject("Opportunity"); //create a new sObject for storing updated record details
update_Opportunity.Id = records[a]; //set the Id of the selected Opportunity record
update_Opportunity.OwnerID= "0050V0000073CQuQAM"; //set the value for Status to 'Unqualified'
updateRecords.push(update_Opportunity); //add the updated record to our array
result = sforce.connection.update(updateRecords); //push the updated records back to Salesforce
parent.location.href = url; //refresh the page
MuamaEnence MuamaEnenceMuamaEnence MuamaEnence
The quick answer is no, Muama Enence does now not paintings with out internet. Visit here You will want a steady connection to the internet (similarly for your cellphone being linked to the device) that allows you to begin translating anything. This records isn't noted on their web site.
Hi Kavya, You can do the same using quick action lightining component. But you will have to create a custom component using force:CreateRecordEvent or Force:EditRecordEvent. Using this you can also populate the fields but the fields displayed on UI will be coming from the fields displayed on the pagelayout. 

Hope this helps!