• mshroyer
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
Hello!

I'm trying to create a publisher action with a visualforce page that calls a visual workflow...and I'm learning how to do all 3 at the same time. Pretty new to publisher actions, never built anything with visualforce and this will be my first visual workflow. So go easy on me :)

The Visualforce page is actually very simple, all it needs to do is set the Opportunity Id to a variable that I call in the Visual Workflow. This is working fantastically! However, the window in the publisher action is small and cuts out a lot of fields I have in my Visual Workflow screen. I need to know how to adjust the height so that I can fit all of my fields in the window. Also, I'd love for the fields to be in 2 columns (not sure if I do that in visualforce or the workflow).

Here's my Visualforce page code, like I said, very simple, but how do I adjust the height of the publisher action window with it? Is that possible? (reminder, never done a visualforce page before, I'm fine with apex, but this visualforce stuff is quite a bit different)

<apex:page standardController="Opportunity"  >

        <flow:interview name="New_JBH_Request" >
            <apex:param name="Opportunity" value="{!Opportunity.Id}"/>
        </flow:interview>
  
</apex:page>

Disclaimer, new to this stuff. I have a task trigger that updates custom object records related to the Account based on task type. In order to get the values for the custom object I query for the custom records where the Account on the record = the account on the Task that was just completed, then I put the results of the query in a list/map:

 

for

(CRM_Cadence_Checkpoint__c CadC : [

Select Id, CRM_Activity_Type__c, CRM_Last_Cadence_Activity_Date__c, CRM_Active__c, CRM_Account__c, CRM_Next_Cadence_Activity_Date__c

 FromCRM_Cadence_Checkpoint__c

 where CRM_Account__c = :t.WhatId

 AND CRM_Active__c = True]) {

 

update_cadence_if_nec(t, CadC);

     

  }

 

I then iterate through that list later on and compare the task type to the cadence activity type which decides if it actually gets updated or not.

 

I now have a new requirement where I need to compare two different custom records before I put them in the list. The custom object is called Cadence Checkpoints. The Cadence Checkpoint records have a field called Activity Type which could equal "1" or "2". They also have a Last Activity Date which is what the trigger currently updates. This is what I want to do:

 

Query the fields

If the Date for record with Activity Type = "1" is before or equal to the Date for record with Activity type = "2" then add the record with "1" to the list.

If the Date for record with Activity Type = "1" is after the Date for record with Activity type = "2" then add the record with "2" to the list.

 

The problem is that the query iterates through the records one at a time. So I can't figure out how to compare the two without going outside the for loop for the query.

We have a custom object used to set call schedules. When they set their contact frequency to Weekly we want to set the Next Call Date to the upcoming Saturday. Then when they make a call (Last Call Date is updated to Today) we want to push the Next Call Date out to the next Saturday.

 

But we don't want it to update the Next Call Date unless it's due this week. So if the Next Call Date is this Saturday, then if they make a call we want it to update, but if the Next Call Date has already been updated to next Saturday, then we wouldn't want it to update again if they call again this week. Only update Next Call Date if it is set to this coming Saturday.

 

What I need in a nutshell:

 

IF (CRM_Scheduled_Contact_Frequency__c  == 'Weekly') { Set Next Call Date to Saturday}

IF(CRM_Last_Call_Date__c == Today && CRM_Scheduled_Contact_Frequency__c == 'Weekly' && CRM_Next_Call_Date__c == This Saturday {

       Update Next Call Date to next Saturday}

 

If the Next Call Date != This Saturday then do nothing

 

 

I am not the most experienced in Apex and Day of Week code is rather confusing to me. Any help would be appreciated!

Fairly new to apex fyi,

 

I created a trigger that creates multiple records on a custom object based on certain criteria at the account level. So if certain fields on the account have specific values it could create 3-5 different records on the custom object. The trigger runs fine, what I need to do is make it execute on many of our current accounts. We can't wait until each one is manually updated to make the trigger run but since triggers won't run until the record is updated I believe we need to do a mass update on Accounts.

 

If this is correct, what is the best way to mass update accounts in order to make my trigger execute and create the custom records? Is there a way to make the trigger run without doing a mass update? (roughly 5500 accounts would be affected by the trigger)

 

Thank you!

I'm kind of new at this apex stuff. Don't know if this is even possible

I have a custom object (Cadence Checkpoint) that is a child object to the account. What we need is when a task is completed on the account, a field gets changed on a Cadence Checkpoint related to the same account.

 

First, When a task is saved as "completed" look at the Account ID it's related to.

 

Second, Check to see if there are any Cadence Checkpoints that are also related to that same Account ID.

 

Third, If there are related Cadence Checkpoints, look to see if the task record type matches up with the Activity Type field on the Cadence Checkpoint ("log a call" record type on a task would match up to "contact - phone call" picklist value on the cadence)

 

Fourth, if the record types match, change the date field on the Cadence to "Today"

 

Any and all help would be greatly appreciated. Thank you!

-Meaghan

Disclaimer, new to this stuff. I have a task trigger that updates custom object records related to the Account based on task type. In order to get the values for the custom object I query for the custom records where the Account on the record = the account on the Task that was just completed, then I put the results of the query in a list/map:

 

for

(CRM_Cadence_Checkpoint__c CadC : [

Select Id, CRM_Activity_Type__c, CRM_Last_Cadence_Activity_Date__c, CRM_Active__c, CRM_Account__c, CRM_Next_Cadence_Activity_Date__c

 FromCRM_Cadence_Checkpoint__c

 where CRM_Account__c = :t.WhatId

 AND CRM_Active__c = True]) {

 

update_cadence_if_nec(t, CadC);

     

  }

 

I then iterate through that list later on and compare the task type to the cadence activity type which decides if it actually gets updated or not.

 

I now have a new requirement where I need to compare two different custom records before I put them in the list. The custom object is called Cadence Checkpoints. The Cadence Checkpoint records have a field called Activity Type which could equal "1" or "2". They also have a Last Activity Date which is what the trigger currently updates. This is what I want to do:

 

Query the fields

If the Date for record with Activity Type = "1" is before or equal to the Date for record with Activity type = "2" then add the record with "1" to the list.

If the Date for record with Activity Type = "1" is after the Date for record with Activity type = "2" then add the record with "2" to the list.

 

The problem is that the query iterates through the records one at a time. So I can't figure out how to compare the two without going outside the for loop for the query.

Fairly new to apex fyi,

 

I created a trigger that creates multiple records on a custom object based on certain criteria at the account level. So if certain fields on the account have specific values it could create 3-5 different records on the custom object. The trigger runs fine, what I need to do is make it execute on many of our current accounts. We can't wait until each one is manually updated to make the trigger run but since triggers won't run until the record is updated I believe we need to do a mass update on Accounts.

 

If this is correct, what is the best way to mass update accounts in order to make my trigger execute and create the custom records? Is there a way to make the trigger run without doing a mass update? (roughly 5500 accounts would be affected by the trigger)

 

Thank you!

I'm kind of new at this apex stuff. Don't know if this is even possible

I have a custom object (Cadence Checkpoint) that is a child object to the account. What we need is when a task is completed on the account, a field gets changed on a Cadence Checkpoint related to the same account.

 

First, When a task is saved as "completed" look at the Account ID it's related to.

 

Second, Check to see if there are any Cadence Checkpoints that are also related to that same Account ID.

 

Third, If there are related Cadence Checkpoints, look to see if the task record type matches up with the Activity Type field on the Cadence Checkpoint ("log a call" record type on a task would match up to "contact - phone call" picklist value on the cadence)

 

Fourth, if the record types match, change the date field on the Cadence to "Today"

 

Any and all help would be greatly appreciated. Thank you!

-Meaghan