• Gheorghe Sima
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 7
    Replies

I have a validation rule on Contact which don't let me make a Contact without Email or Phone number, but I have some cases when the user can create an Contact without email and Phone. I have a visualforce page to create a new contact and when the user click Save and he don't put the email or phone I want to show a popup window and ask him if he want for sure to create a contact without email or phone. Can anyone explain me how to do this? (In Save method if email and phone are not introduced I put a text in the  Email field to pass the validation rule)
I want to change the Account related to an Account, but when i make the update on Contact's records it doesn't change the Account.
Can anyone help me?
That is my apex code.
User-added image

User-added image
Hi,
I have a custom object named Service__c and it has a lookup with other object named Product__c. I want to create a button which allows me to add multiple products on the Product related list from Service object. This button should do what the "Add product" button from Order does(whitout that filter )
User-added image
Hi,
I have a javascript code what shows me a popup message, but when i click cancel it execute me the action from the command button.
here is my code:
<script type="text/javascript">
        function Verif(emailAddress, phone) 
        {
            if(emailAddress == '' && phone == '')
                 return confirm('Are you sure?');
            return null;     
        }
   </script>

and here is the button declaration:
<apex:commandButton action="{!save}" value="Save" onclick="Verif(document.getElementById('{!$Component.pb.pbs.pbsie.email}').value,document.getElementById('{!$Component.pb.pbs.pbsip.phone}').value );"  />
User-added image
When I click Cancel on the popup window it execute me the action from the button and I don't want to do this. Can anyone help me?
I want to change the Account related to an Account, but when i make the update on Contact's records it doesn't change the Account.
Can anyone help me?
That is my apex code.
User-added image

User-added image
Hi,
I have a custom object named Service__c and it has a lookup with other object named Product__c. I want to create a button which allows me to add multiple products on the Product related list from Service object. This button should do what the "Add product" button from Order does(whitout that filter )
User-added image