• Steve_W
  • NEWBIE
  • 35 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies
In 'Creating Validation Rules' challenge, MailingPostalCode and ShippingPostalCode fields are not available in Contacts and Accounts respectively. 
  • October 21, 2015
  • Like
  • 0
I am using <analytics:reportChart> in a VF page on my Account Page layout and am wondering if there is a way to do two things.

1. can i have a row limit on my chart? the source is a summary report.
2. can i control the behaviour when a user clicks on the report chart to either open in a new tab or prevent any action entirely.
 
<analytics:reportChart cacheResults="false" developerName="Account_Order_count_by_Print_Item" filter="[{column:'Account.Id',operator:'equals',value:'{!Account.Id}'}]" size="small"></analytics:reportChart>

Thanks
Am i crazy or did the old developerforce boards have a button to insert a code snippet into your post?

I have a list in my trigger 

 

List <Trial__c> Tr = [Select id, Quote__c, Trial_Sub_Status__c from Trial__c where Quote__c in (Select QuoteId from QuoteLineItem )];

 

I want to run some code if the string 'Approved' exists in any of the records returned in my List definition

 

if(Tr[0].Trial_Sub_Status__c =='Approved') works for a single value but how can i iterate through each of the values for this specific field? I only anticipate 1-3 records at the most.

 

been searching for a while now and can't seem to figure out the right words to search with.

 

Thanks

I am trying to get a value from a picklist field on an object that has a lookup field to the objet that my trigger is running on. The purpose of the trigger is to prevent updates or deletion to a Quote Line Item record based on certain picklist values on the Trial__c object.

 

trigger QuoteLineItemStopDelete on QuoteLineItem (before delete, before update) {

if(Trigger.isDelete){
  for(QuoteLineItem qli : Trigger.old){
      List <Trial__c> Tr = [Select id, Quote__c, Trial_Sub_Status__c from Trial where Quote__c = qli.QuoteId ];

 

I am getting an unexpected token error relating to the qli.QuoteId field, can anyone explain what i am doing wrong? I want to get the id of Trial__c record where the QuoteId from the QuoteLineItem equals the Quote__c id from the Trial__c object.

 

Thanks

Hi, I am working on the trigger below to insert a task when my custom object record has a specific Status value. The below code is what i have been able to piece together.

 

 

trigger SOWCompleteTask on SOW_Request__c (after update) {
List<Task> tsk = new List<Task>();
for (SOW_Request__c sow : Trigger.New)
if (sow.SOW_Status__c == 'SOW Completed'){
tsk.add (new Task(
Subject = 'SoW walkthrough with customer',
Status = 'Waiting on someone else',
ActivityDate = System.today()+10,
WhatId = sow.Id));
}
insert tsk;

}

 

There are 2 main issues i am having.

 

1. the first time the trigger runs it inserts 2 task records

2. additional record edits result in the creation of 1 new task record.

 

How can i stop the creation of the duplicate record? AND How can i prevent the task from being created again when the record is saved and still meets my criteria?

 

any help is greatly appreciated.

fairly new to apex so go easy on me :)

I am beginner :  Not able to solve Trailhead challange for-Developer Beginner :Process Automation-Automate Basic Business Processes with Process Builder
"
Create a process to update child record when the parent is updated.
You've been given a requirement to keep Contact addresses in sync with the Account they belong to. Use Process Builder to create a new process that updates all child Contact addresses when the address of the Account record is updated. This process:
Can have any name.
Must be activated.
Must update Contact mailing address fields (Street, City, State, Post Code, Country) when the parent Account shipping address field values are updated.
NOTE: You may have to deactivate the validation rule for the Contacts object (created from a previous challenge) in order to complete this challenge."

 What I had tried 
Deleted validation rule on contact  from previous challange.
 Using Process builder created new Process with below details
Object: Account
Criteria:'Update Address' with condidtion

Field: selected shipping street, city, state,postalcode and country
Operator: Ischanged
Type: boolean
value: true

Condition:
Any condition met (OR)

 For Immediate action
Action name: Mailing address change
Records: Account.contacts
Criteria for Updating Records:No criteria—just update the records!

Set new field values for the records you update:

Field: selected Mailing street, city, state,postalcode and country
Type: Reference
value:  selected shipping street, city, state,postalcode and country

 after this saved and activated. So Once I check challange got below error:
"Challenge Not yet complete... here's what's wrong:
An update to an account record failed to update the mailing address fields of all child contact records. Make sure that the process is correct and that it is activated."

So Please help.





 
In 'Creating Validation Rules' challenge, MailingPostalCode and ShippingPostalCode fields are not available in Contacts and Accounts respectively. 
  • October 21, 2015
  • Like
  • 0
I heard that Trailhead will soon have end-user modules - any ETA on when those will be ready? 

Hello,

 

I was successful refreshing reports out of the sandbox into the IDE, cut and paste the reports to a different folder locally, then refresh and save to server in the sandbox to mass move reports (report cleanup)

 

Now when I do the same for the production region, the files won't save to the server. I get "File only saved locally, not to server" warnings and some errors " Save error: filters-criteriaItems-condition: Operator does not work with the selected column" and "Save error: curency:Unsupported currency:GBP" in the error logs. The rest of the reports save locally, not to the server.

 

Can anyone help me understand how I was successfully able to perform this task in the sandbox environment but not production?

 

Thanks

I have a list in my trigger 

 

List <Trial__c> Tr = [Select id, Quote__c, Trial_Sub_Status__c from Trial__c where Quote__c in (Select QuoteId from QuoteLineItem )];

 

I want to run some code if the string 'Approved' exists in any of the records returned in my List definition

 

if(Tr[0].Trial_Sub_Status__c =='Approved') works for a single value but how can i iterate through each of the values for this specific field? I only anticipate 1-3 records at the most.

 

been searching for a while now and can't seem to figure out the right words to search with.

 

Thanks

Hi, I am working on the trigger below to insert a task when my custom object record has a specific Status value. The below code is what i have been able to piece together.

 

 

trigger SOWCompleteTask on SOW_Request__c (after update) {
List<Task> tsk = new List<Task>();
for (SOW_Request__c sow : Trigger.New)
if (sow.SOW_Status__c == 'SOW Completed'){
tsk.add (new Task(
Subject = 'SoW walkthrough with customer',
Status = 'Waiting on someone else',
ActivityDate = System.today()+10,
WhatId = sow.Id));
}
insert tsk;

}

 

There are 2 main issues i am having.

 

1. the first time the trigger runs it inserts 2 task records

2. additional record edits result in the creation of 1 new task record.

 

How can i stop the creation of the duplicate record? AND How can i prevent the task from being created again when the record is saved and still meets my criteria?

 

any help is greatly appreciated.

fairly new to apex so go easy on me :)

Hi All

We have some kind of unique problem.

On Opportunity, While adding Opportunity product when we give 100% discount it shows Total price = 0.0 and sales price = 100.00 $ (For e.g.. Only)
But when we update above product without changing any value ( Just click on Edit and click on Save ) Sales Price become null.
We can't figure it out why sales price is becoming NULL.


We have some logic on Before Insert / Before update of Opportunity Product which set Discount field to some value depends on some conditions.
We observe when we remove this logic the issue is not reproducible. Same issue is not reproducible when we provide any discount other than 100%.
Same logic is getting fired here also). We can’t understand how sales price will become NULL if we set discount = 100%. (If sales price become 0.00$ it is acceptable)

Could you suggest some pointers?

How to hide/disable the 'Add Case Comment' button when the case status is closed?

 

Thanks.