function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi,
i want to insert value calculated in a controller into a custom object how can i do this??? kindly help its urget
You can do like this
String calculatedValue{get;set;}
calculatedValue = //Your calculation;
ObjectName objectVariable = new ObjectName();
objectVariable.FieldName = calculatedValue;
insert objectVariable;
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
You approach should be following;
1. Retrieve your record in variable of that type(your object type)
2. Equate value to that field
3.Update the object varaible (you record)
For example if i want to update email field on contact record,
Contact con = [select id, email from contact where id =:'345tth65agte54rf33'];
con.email = 'Myneemail@gmail.com';
update con;
this will update contact whose id is "345tth65agte54rf33"
It completely depends on you how/from where yuo get your record.
thanks
Hi,
You can do like this
String calculatedValue{get;set;}
calculatedValue = //Your calculation;
ObjectName objectVariable = new ObjectName();
objectVariable.FieldName = calculatedValue;
insert objectVariable;
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
You approach should be following;
1. Retrieve your record in variable of that type(your object type)
2. Equate value to that field
3.Update the object varaible (you record)
For example if i want to update email field on contact record,
Contact con = [select id, email from contact where id =:'345tth65agte54rf33'];
con.email = 'Myneemail@gmail.com';
update con;
this will update contact whose id is "345tth65agte54rf33"
It completely depends on you how/from where yuo get your record.
thanks