• jarrodmichael
  • NEWBIE
  • 0 Points
  • Member since 2010
  • MVP
  • Appirio


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 13
    Replies

I am trying to come up with a way to Trigger Child Records to be created once the Parent is created based on certain criteria.

 

For example:

I create a Timesheet for the begin date of 5/10/2010 and end date of 5/25/2010.  I want to create a Time Entry(child record) for each date inside of that range.

 

Does anyone know if this is possible?  I know I could trigger a child record but wasn't sure if I could based on criteria.

 

Thanks for any help!

I am trying to create some logic that will alert an internal group if a number field "Cards Available" changes by a certain % in different given time frames (1 day, 2 weeks, etc.).

 

For example:

If over the course of 2 weeks, the numbers of cards available decrease by more than 15% can it trigger an email alert.

I am making our Projects object into the Tabbed look.  However, I've found that when I do that I can no longer double-click on fields to edit them.  Is there anyway to include this in the Visualforce page functionality?  Thanks for any help!

Does anyone know of a way to create a "Mass Submit for Approval" button on a Custom Object?  I have the process already created but we need to be able to submit many at once.  Any help is appreciated!

Does anyone know of a way to make it so that if you are approving from the "Items to Approve" List view that it will take you back to the list?

 

Our CFO needs to be able to approve records from a list but wants to be taken back to the list after approval.

 

Thanks for any insight anyone can provide! 

Hi there, I have an approval process and in this approval process I have added an email template with merge fields (ApprovalRequest.Comments) for comments and this template I have used in the final rejection action as an email alert but when I receive the email, I get this field value as blank even though the user has entered the comment, I did also search and found that

 

ApprovalsIf the email template you choose contains approval merge fields named{!ApprovalRequest.field_name}, these fields will return values only when that email template is used as the approval assignment template. If you use the template for any other email alert action—in either workflow rules or approval processes—the merge fields will return a null value.

 

Any help/comments on this is greatly appreciated

 

Thanks

Pradeep

  • September 03, 2013
  • Like
  • 1

Hello,

 

If someone have some interest about that, I've create a barcode package for COE39, CODE128 and EAN13.

Currently it's only a beta version, if some of you have some interest about barcodes.

 

For dev edition

 

https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04tA00000005SPH

or for sandbox

 

https://test.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04tA00000005SPH

I am trying to create some logic that will alert an internal group if a number field "Cards Available" changes by a certain % in different given time frames (1 day, 2 weeks, etc.).

 

For example:

If over the course of 2 weeks, the numbers of cards available decrease by more than 15% can it trigger an email alert.

I am not a developer but need help to create a formula that will allow me to do the following

 

1. I have a custom field in 'Opportunities' layout called 'Proposer' that has a drop down box with about 12 choices. It is a mandatory field in opportunity creation at the moment.

 

2. I also have a similar custom field in the 'contact' layout with the same drop-down values.

 

3. I want to create a formula that automatically imports the value from the custom field in the 'contact' layout into the custom field in the 'opportunity' layout, coming from the contact that the opportunity relates to.

 

Can anyone help me? I am based in London, UK.

I am making our Projects object into the Tabbed look.  However, I've found that when I do that I can no longer double-click on fields to edit them.  Is there anyway to include this in the Visualforce page functionality?  Thanks for any help!

How would a Opportunity based Validation Rule be created if a checkbox field (i.e. Credit Approved) most be selected before saving a Opportunity record and the Sales Process Stage is either "Process Order," "Closed Won" or "Installed" for a particular Opportunity Record Type?

Does anyone know of a way to create a "Mass Submit for Approval" button on a Custom Object?  I have the process already created but we need to be able to submit many at once.  Any help is appreciated!

Does anyone know of a way to make it so that if you are approving from the "Items to Approve" List view that it will take you back to the list?

 

Our CFO needs to be able to approve records from a list but wants to be taken back to the list after approval.

 

Thanks for any insight anyone can provide! 

I am trying to automatically submit a record for approval in a visualforce page but hitting some problems.  I tried following the Apex Approval Processing example (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_example.htm) but I get this error:

Code:
System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval 
process found.

 
So I thought I needed to create a ProcessInstance but trying to insert this results in:

Code:
System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, 
Required fields are missing: [ProcessDefinitionId, CurrentNodeId]: [ProcessDefinitionId, CurrentNodeId]

 
I have set up an approval process for my custom object and it is active so that doesn't seem to be the problem.  This is a controller extension for my VF page and the 'record' variable is the object that has been passed into the page.  Here is my function that uses the submit for approval :

Code:
public void SubmitApproval()
    {
/* Attempting to set up a ProcessInstance
ProcessInstance approvalProcess = new ProcessInstance(); approvalProcess.TargetObjectId = record.Id; //approvalProcess.ProcessDefinitionId = ; approvalProcess.Status = 'Started'; //approvalProcess.CurrentNodeId = ; //insert approvalProcess;
*/

// Create an approval request
  Approval.ProcessSubmitRequest approvalRequest = new Approval.ProcessSubmitRequest(); approvalRequest.setComments('Testing Approval Submit'); approvalRequest.setObjectId(record.Id); Approval.ProcessResult approvalResult = Approval.process(approvalRequest); if (!approvalResult.isSuccess()) { ApexPages.Message error = new ApexPages.Message(ApexPages.Severity.ERROR, 'There was an error with the Submit For Approval Request.'); ApexPages.addMessage(error); } }

 
Edit:  Just a quick update.  If I submit the record for approval using the normal way I can then create a commandButton that approves the pending request.  This approval doesn't run into any problems at all.  I must be missing something from my Submit request.






Message Edited by XactiumBen on 06-24-2008 03:21 AM

Message Edited by XactiumBen on 06-24-2008 03:50 AM
I followed the example provided at http://wiki.apexdevnet.com/index.php/Extended_Functionality_of_Visualforce_-_Part_2 to create dynamic picklists on a form for entering information.  The idea behind the form is that the user will select a group from a picklist.  The chosen group generates the categories related to it.  This works beautifully, unfortunately the tutorial cut off before going into more detail on working with dependent pick lists.  The main point of the form is so the user can enter in topics and directions.  This also works, however in addition to submitting data to those fields in the custom object, their selected category also needs to be submitted to the category field (which has a lookup relationship to the category custom object).

here's my visualforce page code...

<apex:page showheader="true" standardcontroller="Topic__c" extensions="helpFormController" id="UseCaseDisplay" label="TopicCategoryReport" >

<apex:form>


<apex:outputLabel value="Grouping:" for="grouping"/>
<apex:selectList value="{!grouping}" size="1" id="grouping">

<apex:selectOptions value="{!groupings}"/>
<apex:actionSupport event="onchange" rerender="categories"/>
</apex:selectList>
<a class="title" href="/apex/addgrouping" target="_blank">New</a>
<br /> <br />

<apex:outputLabel value="Category:" for="categories"/>
<apex:selectList value="{!Category}" size="1" id="categories" disabled="{!ISNULL(grouping)}">
<apex:selectOptions value="{!Categories}"/>
</apex:selectList>
<a class="title" href="/apex/addcategory" target="_blank">New</a>
<br /> <br />
<h2>New Topic: </h2>
<apex:inputField value="{!Topic__c.name}" id="topic"/><br /><br />
<h2>Directions: </h2><br />
<apex:inputtextarea id="directions" cols="100" rows="25" value="{!Topic__c.Directions__c}"/> <br /><br />
<apex:commandButton value="Save" action="{!Save}" onClick="beforeTextSave()"/>
</apex:form>
</apex:page>

And here is the controller extension code...

public class helpFormController {

public helpFormController (ApexPages.StandardController stdController){

}
/* String value for the grouping */
String grouping;

/* String value for the category */
String category;

/* Getter for the grouping value */
public String getGrouping() { return this.grouping; }

/* Setter for the grouping value */
public void setGrouping(String s) { this.grouping = s; }

/* Getter for the category value */
public String getCategory() { return this.category; }

/* Setter for the category value */
public void setCategory(String s) { this.category = s; }

/* Getter which dynamically generates the groupings from the Grouping__c object. */
public List<SelectOption> getGroupings() {
List<SelectOption> optionList = new List<SelectOption>();
/* Add a null option to force the user to make a selection. */
optionList.add(new SelectOption('','- None -'));

/* Loop through the feature_category__c records creating a selectOption
for each result with the record ID as the value and the name as the label
displayed in the selectList */

for (Grouping__c fc: [select name from Grouping__c order by Name]){
optionList.add(new SelectOption(fc.id,fc.name));
}
return optionList;
}
/* Getter which generates the options for the Topic selectList based on the current
value of the selected category. If there is no value selected then only
the null option should be returned. */


public List<SelectOption> getCategories() {
List<SelectOption> optionList = new List<SelectOption>();
/* Add a null option to force the user to make a selection. */
optionList.add(new SelectOption('', '- None -'));

/* If a category has been selected then query for the related values */
if(grouping!= NULL) {

/* Loop over the related feature records for the given category
creating a selectOption with the value being the feature record ID
and the label is the name of the feature. */

for (Category__c f : [select name from Category__c f where f.Grouping__c = :grouping]){
optionList.add(new SelectOption(f.name,f.name));
}
}
return optionList;
}
}