You need to sign in to do that
Don't have an account?
Yoshinori Mori
yourObject stands for something as default?
I would like to know if 'yourObject' is used within Apex as defalt?
Thanks
Mori
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
I would like to know if 'yourObject' is used within Apex as defalt?
Thanks
Mori
I don't believe this is the case - I've just created a custom class called 'yourObject' and it compiled without problem.
Dear bob_buzzard
I was just wondering if something like "yourObject.Name = 'none' " is executed somewhere within the classes would afferect entire organization or some other classes.
I would like make it sure it doesn't affect anything.
Thanks
Mori
This indicates that yourObject is an sobject or instance of a custom class, in which case the assignment will only affect that particular item.
Dear Bob Buzzard
Thank you for the explanation.
I understood.
I still have a wonder why there was a message "Method Not available" which my part doesn't call or is not related to.
Mori
This sounds like a missing setter or similar.
Can you post your code?
Dear bob_buzzard
Test Class is as below.
@isTest
private class A class {
static testMethod void myUnitTest() {
A class controller = new A class();
controller.YourObject.Name = null;
controller.save( );
}
The A class to be run-tested is as below.
public with sharing class A class {
public List<Datastore__C> objecttobesotred { get; set; }
-----------------------------------------abbreviation-----------------
(initializing programming code from List object)
(setdata to object programming code)
---------------------------------------------------------------------------
public PageReference save()
{
try {
upsert objecttobestored;
init();
inputflg = false;
} catch (DmlException de) {
System.debug(de.getMessage());
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error, de.getMessage()));
}
return null;
}
There might be a slight possibility that controller.YourObject.Name = null; was ran
Thanks
Mori
The controller would need a property of yourObject in order for that line to successfully run.