function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jd123jd123 

How can i Achieve ???

HI Everyone,

I have one object StockTransfer 

fields

1,source location

2,destination location

3 quantity

4,date

 

my question is if the date value is today then the quantity is transfer from source location to  destination location.

After clicking save it is done perfectly but based on date it should be done.

If the date value is 2maro then it should be transfer the quantity 2maro

based on the date it should be done.

How can I achieve this an one can help me please.

Thanks. 

Devendra@SFDCDevendra@SFDC

 

Hi jd123,

 

You can use Workflow rule to achive this.

 

Create a workflow rule and use action : Field Update to achive this.

 

Thanks,

Devendra S

jd123jd123

Hi Devendra,

I couldn't understand would you please explain in detail.

Actually I have written trigger for this but trigger will execute before insert,after insert,before update or after update

when I am saving it ll check date is today or not if date is today then transfer the quantity from one site to another site but if date is not today then it ll not transfer. When the date is reached to today then the quantity should be transfer from one location to another location Automatically.

   

For This

 

how can I execute trigger  daily or how can I execute when the date is reached to today then I execute trigger 

in which way I have to do??

And how can I modify date field day by day.

Thanks

Devendra@SFDCDevendra@SFDC

Hi,

 

If you want to execute your logic on daily basis then you can make use of

Apex Scheduler:

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm

 

Thanks,

Devendra

jd123jd123

Can i call trigger daily  from Scheduler class??

John DeepJohn Deep

Hi..

You can achieve it by workflow rule,

 

First of all you have to create a workflow rule with your required criteria,for that criteria you can set a action like field update in your records.That means whenever the criteria met automatically the field update will be done.

 

Navigate thru this u can find it very useful   setup-->AppSetup-->create-->Workflow...

 

AmitSahuAmitSahu

Yes, you can but NOT trigger....You can schedule the apex class...

jd123jd123

Hi j020,

Would you please send some examples. I couldn't find the total class how to call mybatch class  from schedulable class ???

Would you please provide some links