You need to sign in to do that
Don't have an account?
conditional statements usage
hi i have address custom object ,i am creating a vf page for address-->custom object address have record type billing,shipping,company in different sections separately in a custon vf page,on click a save button only first section i.e billing address is saving shipping and company address not saving can any one help me in conditiions to use.
my condition:
public PageReference save() {
if(adresstype=billing)
{
address record type will save;
}
else
if(adresstype=shipping)
{
address record type will save;
}
else
if(adresstype=company)
{
address record type will save;
}
}
only address with billing is saving.
i want the three address to save in a button click.
Hi Anu,
in APEX comparisons are done with double = signs. Try using == in the if-statements instead.
Cheers!
Martin
can you send me a sample code
if(adresstype == billing)
Like Martin wrote above, == (double equals) for comparison, single equals (=) for assignment