• Mitchell McConnell 2
  • NEWBIE
  • 15 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hello all,

I have been away from Salesforce development for a few years, and am just getting back to it.   I have an app I have created in my developer sandbox, and I am creating some REST code with Python for testing. 

I have some Apex code that causes things to happen based on the date.    So I might have something that should happen one month from today.   How can I cause my instance to run with a date that is in the future, so I can test my code?

Thanks,

Mitch

I have spent all morning trying to get this to work, including looking at dozens of Google and SFDC posts.


I have a report that I want to be able to provide a date as a parameter for, and I want the user to be able to choose the date.


I created a (my first) VisualForce page to do this, after experimenting with many examples.  If you
have looked at DatePicker, you will know that there are issues with using a native datepicker for
a custom object field.

I was able to find an example that uses JQuery's datepicker, and that part of the page works fine.
The problem I am having is that I want the VF page to have a button that invokes the report, passing
the date as the parameter.

The URL for the report looks like this, and I can manually change the date and watch it work correctly:
        https://instance.salesforce.com/00Oo0000002qAb9?pv0=%2711/1/2014%27

In my VF page, the user data ends up in an input field named 'reportEndDate'.  I have tried to put this
into the action field of an apex commandButton (inside an apex form) as follows:

      <apex:commandButton value="Run Report" action="/00Oo0000002qAb9?p0={$reportEndDate}" />

This URL *does* go to my report page, but does not pass the date correctly.
I have tried every permutation of ways to get the output in the correct format, but after at least
5 hours of trying figured I would post this question.

I can post more of the code if necessary, but figured I would start here.

How can I get the output from the text field 'reportEndDate' to be the correct URL
for my report to work?

Thanks,

Mitch

 

 

I have a formula for a custom field on a custom object that uses "ISBLANK" to set a field differently based on whether or not the field is set.

However, I also want users to be able to modify the same record at a later time.  At that point, I do not want that exact logic, or at least I want to make sure it bhaves slightly differently.  When I tried to use ISNEW in the original formula, it gave me an error: "Function ISNEW may not be used in this type of formula".

So I am not sure how to accomplish what I want.

If ISNEW would work here, I think the logic is pretty straightforward.

Is there a way to make the formula use an Apex method?
 

Hello all,

I have been away from Salesforce development for a few years, and am just getting back to it.   I have an app I have created in my developer sandbox, and I am creating some REST code with Python for testing. 

I have some Apex code that causes things to happen based on the date.    So I might have something that should happen one month from today.   How can I cause my instance to run with a date that is in the future, so I can test my code?

Thanks,

Mitch
Hi All, Hope you are supporting well
I have a dought i.e., what is Batch size ?
What is Batch Job?
what is the difference b/w these two?
and where we are using these two?
 

I have a formula for a custom field on a custom object that uses "ISBLANK" to set a field differently based on whether or not the field is set.

However, I also want users to be able to modify the same record at a later time.  At that point, I do not want that exact logic, or at least I want to make sure it bhaves slightly differently.  When I tried to use ISNEW in the original formula, it gave me an error: "Function ISNEW may not be used in this type of formula".

So I am not sure how to accomplish what I want.

If ISNEW would work here, I think the logic is pretty straightforward.

Is there a way to make the formula use an Apex method?