• Rakul Srivastav
  • NEWBIE
  • 20 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies

I need to add a validation error message for an input in Flow.

I have a Phone field where I have maintaned a validation, where the phone number should be of length 10, it should not start with 1. I'm using the below formula.
 AND( LEN({!School_Phone_Key})=10,
NOT(REGEX({!School_Phone_Key} ,"^[a-z A-Z]*$")) ,
NOT(LEFT({!School_Phone_Key}, 1) = "1")
)

Now I also need to check if any symbol is presnt in the field, it should be restricted if the 10 digit number has any symbol. Can someone please guide me with the formula.

I'm trying to fetch datetime in the below format but unable to get it the exact way i need it.

I need it as dd-mm-yyyy, hh:mm AM/PM, I'm using below func "Datetime.NOW().format()" which gives me as "7/19/2021, 6:28 AM". The date is coming as MM/DD/YYYY and time is correct format, but my requirement is DD/MM/YYYY , hh:mm AM/PM.

which func can be used?

How can i get records for a query where i need to get the records which are created between 8p.m PST the previous day to 8p.m PST today. Please help me with the query in Apex.

I have a date field as '2021-05-17T22:00:59.000+0000', now i need to check if that field falls in between Yesterday 8p.m PST to today's 8p.m PST. and yesterday and today is not a fixed date, i need to use it in query. 

I could have used "SELECT Id,CreatedDate FROM Account WHERE CreatedDate >= 2021-06-21T20:00:00Z AND CreatedDate <= 2021-06-22T20:00:00Z" but it is for a fixed date. i want it to be dynamic.

 i want here yesterday and today which is dynamic and time in 8p.m PST. daily emails to be sent for the past 1 day between 8pm PST the previous day to 8p.m today
I'm new to Salesforce, please guide me.

How can i get records for a query where i need to get the records which are created between 8p.m PST the previous day to 8p.m PST today. Please help me with the query in Apex.

I need to add a validation error message for an input in Flow.

I have a Phone field where I have maintaned a validation, where the phone number should be of length 10, it should not start with 1. I'm using the below formula.
 AND( LEN({!School_Phone_Key})=10,
NOT(REGEX({!School_Phone_Key} ,"^[a-z A-Z]*$")) ,
NOT(LEFT({!School_Phone_Key}, 1) = "1")
)

Now I also need to check if any symbol is presnt in the field, it should be restricted if the 10 digit number has any symbol. Can someone please guide me with the formula.

How can i get records for a query where i need to get the records which are created between 8p.m PST the previous day to 8p.m PST today. Please help me with the query in Apex.