You need to sign in to do that
Don't have an account?
RC_48
Update field and display message on UI
Hi ,
I have a requirement, if user clicks a button order object field should update and display a message on UI. Please let me know how it can be acheived using New button or Link and VisualForce.. Once i click the button on detail page layout I should update the field and display message on UI.
I have a requirement, if user clicks a button order object field should update and display a message on UI. Please let me know how it can be acheived using New button or Link and VisualForce.. Once i click the button on detail page layout I should update the field and display message on UI.
Add the action to the Layout. This action will be availble as button now on record. Here I used Account object and Validate Latest Contact as Checkbox field.
Please modify these according to your requirement.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
Is there any specific field that should get updated?
We can do it using screenflow. Let me know if you need any help on the screenflow.
Thanks,
K. Sai Praveen Kumar
Yes we have new check box field that should change to true if user clicks the button and display message on UI.
Thanks,
Ragadeep
Create a screenflow as below.
First Create a variable as below to capture the recordid:
Drag a Update record action and fill the details as below.
Add the Screen Component into the flow and fill the details as below.
Search for Display Text and click on it and give the text message you want and name of the display text as shown below.
Now Save the flow and Activate. Continutaion in next comment.
Add the action to the Layout. This action will be availble as button now on record. Here I used Account object and Validate Latest Contact as Checkbox field.
Please modify these according to your requirement.
If this solution helps, Please mark it as best answer.
Thanks,
To update a field when user clicks a button on order object, field should update and display a message on UI. Below mentioned steps can be taken into consideration (using javascript)-
Create a button on order object.
Make it 'detail page button' and select 'execute javascript'.
Copy Paste the below mentioned code.
Code -
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
var agree = confirm("Are you sure you want to go ahead?");
if(agree){
var rma = new sforce.SObject("Account");
rma.id = "{!Account.Id}";
rma.Date_of_Custom__c = new Date().toISOString();
rma.Value1__c = "{!User.Name}";
result = sforce.connection.update([rma]);
debugger;
console.log('result::',(result));
if(result[0].success){
alert('Field Updated Successfully');
}
else{
alert('Error Occurred',result[0].error);
}
}
Thanks,