• Mohammed Mohiddin
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 7
    Replies
Hello Everyone,

How do we set From Address while sending email using messaging.SingleEmailMessage. I have got a solution which uses setOrgWideEmailAddressId to set from address,
OrgWideEmailAddress[] owea = [select Id from OrgWideEmailAddress where Address = 'doNotReply@blahblah.com']; Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); if ( owea.size() > 0 ) { mail.setOrgWideEmailAddressId(owea.get(0).Id); }


But I want to query the record ( say the contact who logged in ) and set that as From Address.

Can Anyone help me out with this?
I am trying to write a query which will allow me to search for a user using their email and first name. I have it working mostly, however the issue I am facing is when a user has two or more words in their first name. 

For example - John Second Doe

Where they add John Second as their first name and Doe as their last name. 

I am using PHP to submit the request to Salesforce and then find the contact and assign their ID to our system. 

Select+Id+From+Contact+Where+Email='johndoe@lc.com'+AND+FirstName='John Second'

This is how the query looks so far, however this returns null. I assume this is because either its not supported or I am passing it in a wrong format. I have tried adding a + and %20, however niether work. I get an empty object.

I have confirmed that I have that user in my Salesforce system. (the name has been changed for the ticket).
Hi 

I am new in Salesforce Begineer

My Question is:

How to validate Phone field of Account Object with Use of Apex Class and the validation is ONly 10 Digit is input by user no sepcial character no characters Only digits and digit will be 10 
and if user input digit according the condition then the record will be save and user not input 10digit then error will be show on the Phone field "Please Provide Valid Number"  on Custom Visual force Page
Please help me ASAP


Thanks 
Neeraj Sharma
 
Hello Everyone,

How do we set From Address while sending email using messaging.SingleEmailMessage. I have got a solution which uses setOrgWideEmailAddressId to set from address,
OrgWideEmailAddress[] owea = [select Id from OrgWideEmailAddress where Address = 'doNotReply@blahblah.com']; Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); if ( owea.size() > 0 ) { mail.setOrgWideEmailAddressId(owea.get(0).Id); }


But I want to query the record ( say the contact who logged in ) and set that as From Address.

Can Anyone help me out with this?

Hi,

 

I was wondering if it is possible to pass parameters to our controller method while in a VF page.

 

For example, normally, say we have a controller called "MyController" and inside it we have a method call "Method" which take a string parameter.

 

Is it possible to call this method and pass a value to it from our VF page? If so how?

 

Would this work?

 

<apex:commandButton action="{!Method('stringvalue'}"/>

 

Thanks in advance.

Hi 

I am new in Salesforce Begineer

My Question is:

How to validate Phone field of Account Object with Use of Apex Class and the validation is ONly 10 Digit is input by user no sepcial character no characters Only digits and digit will be 10 
and if user input digit according the condition then the record will be save and user not input 10digit then error will be show on the Phone field "Please Provide Valid Number"  on Custom Visual force Page
Please help me ASAP


Thanks 
Neeraj Sharma