• Giancarlo Amati
  • NEWBIE
  • 90 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 42
    Questions
  • 56
    Replies

Hi All,

We are building an Experience Community. We'd like to implement the feature that when a user marks a feed comment/item with "Flag" see snapshot. The item will be unpublished. 

I tried to search for example of FeedComment and / or FeedItems, I think this can be done with a FeedItem trigger, but can't figure out hlw.

User-added imageThank you for your help.

GC

Dear All,

after refreshing our full sandbox we noticed the following issue. We are using CPQ to create quotes. We have a button called "Preview Document". This brings us to a page where we can select the template. 

When we select any of the template, and press "Preview" we see the following error message:

core.apexpages.exceptions.ApexPagesGenericException: No Visualforce context has been established!

User-added imageI've never seen that error message before. Where can I look at?
Thank you.
GC
Hi Team,

I have a button on my layout that executes a Javascript, but when clicking on it I receive "Unexpected ===" where SBQQ__Quote__c.SBQQ__BillingFrequency__c is a picklist but I cannot understand why.

Any help?
Thank you
GC
this.disabled = true;
this.className = 'btnDisabled';
​​​​​​​if ( {!SBQQ__Quote__c.SBQQ__BillingFrequency__c} === null) {

window.alert(' The \'Billing Frequency\' field is blank and needs to be populated before submitting this quote for approval. Please update the \'Pay Upfront\' field on the associated opportunity to enter a value into \'Billing Frequency\' ' );

}
else
window.location='./apex/SubmitQuote?Id={!SBQQ__Quote__c.Id}';

 
Dear All,
I am reviewing an set of Apex Classes. Specifically I have a classe that uses a "Stage_Info__c" object. I checked in our production and there is no object called that way.

I checked the dependencies of the Apex class and I saw the screenshot below:

User-added image
I cannot find that object anywhere in our environment. I cannot find the declaration of the object in any of the source codes of the classes. 
Am I missing something ?

Thank you.
GC
Dear All,

I don't understand process builder which I thought it was a nicer way to build workflows.
I have a very simple process builder which checks a few fields value and if the condition it's true than it does an action. This happens when an oppty is closed won.
However, the process builder is failed with the following error:

We can't save this record because the “Account Activation Case From Opp v2.2” process failed. Give your Salesforce admin these details. An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Error ID: 1516978112-91599 (-1701038169)

I don't understand what I need to fix here. The condition is super simple.
User-added image
Dear Team,
I have a process builder flow which simply checks the value of a field and it updates another field in the Account record. 
Oddly, another update process somehow made the FLOW failing so many times that I received the following error message. I don't understand then the connection between the two flows. 

Any suggestions on how to fix it? Oddly this happens quite often when I create processes with Process Builders, but it doesn't happen when I create actual Workflows. 

Thank you.
GC

The flow tried to update these records: null. This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: DSCORGPKG.DiscoverOrgCustomMapping_Account: System.LimitException: Apex CPU time limit exceeded. You can look up ExceptionCode values in the SOAP API Developer Guide.---The flow tried to update these records: null. This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: DSCORGPKG.DiscoverOrgCustomMapping_Account: System.LimitException: Apex CPU time limit exceeded. You can look up ExceptionCode values in the SOAP API Developer Guide.​​​​​​​

User-added image
 
Hi Everyone,

I am currently reviewing the validation rules on opportunities. I've found the following lines, which I'd like to understand. Within the context of a validation rule which triggers the error only when the rule is True, what does these formulas do? Do they related to "Related Lists" child objects of the opportunity? 

Thank you.

NOT(ISBLANK($ObjectType.Live_Event_Coverage__c.Fields.Live_Event_Allotment_Opportunity__c)), /*allows Live Events to process*/
NOT(ISBLANK($ObjectType.SE_Customer_Solution__c.Fields.Opportunity__c )), /*allows SE Customer Solutions to process*/
NOT(ISBLANK( $ObjectType.Live_Event_Coverage_Timing__c.Fields.CoverageLink__c)), /*allows Live Event Timings to process*/
Hi Team,

I'm reviewing an Apex Batch job that failed overnight. I would like to update the email address that it sends in case of failure. I cannot figure out where this is built, but I've found this code in the Apex Class. There is a function called 'Label.BatchJobMonitors.split(';')' but I cannot find the definition. The 'toAddresses' is build based on that.
Any help?
Thank you
String status = (String.isEmpty(job.Status)) ? '' : job.Status;
          status = status.toLowerCase();
          ApexClass ac = [SELECT Id, Name FROM ApexClass WHERE Id =: job.ApexClassID];
      String className = ac.Name;
          Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
          String[] toAddresses = Label.BatchJobMonitors.split(';');
          mail.setToAddresses(toAddresses);
          mail.setSubject(subject);

 

Dear Team,
we've found the following code of a Case Trigger which emits an error message related to the case owner time zone. I checked the users' time zone both in the SFDC Admin --> Users and also in every single profile in the "My Settings" section. They all have a timezone assigned but for some reason, I believe the bcHelper variable is always NULL and so it triggers the error message.
Where else should I be looking at?

Thank you. 

GC
 

Cannot match case owner's time-zone to
a business hour/holiday record; please update case owner's time-zone in the user profile
 
BusinessHoursUtilities.BusinessHoursHelper bhHelper =
mapBusinessHoursHelpersByUserId.get(c.OwnerId);
if (bhHelper == null) {
c.addError('Cannot match case owner\'s time-zone to
a business hour/holiday record; please update case owner\'s time-zone in
the user profile.');
}

 
Dear Team,
I am creating a email template in VF and I would like to include a link at the bottom. 
The link will ask the customer if the case is resolved or not. Something similar to the bottom of the shot. However, we'd like to ask the customer if the chase is "Resolved" or "not resolved". If the case is "Resolved" is there a way to automatically change the case status to "Need to close" or "Closed" or something which updates a case field.

Thank you.User-added image

Dear All, 
I have a set of records (about 100) of the BCAccount type object. I would need to go through each of them and update the same field with a specific value. 
What's the easiest and fast way to do it having the list of BCAccountId which identify each record?

I was thinking to use Dataloader.

Thank you for your help.

GC

 

Dear All,
I have the following project to develop: when a Case is submitted to us, we have to first-respond it within a certain time (our SLA due date/time). I would like to implement an Apex (trigger or Class?) that fires a notification (an outbound message, or email alert ...) 5 minutes before the SLA due date/time. For example:
a case is created on 05/01/2018 at 8.00AM with priority P1. It must be first responded within 15 minutes that means, at 8.15AM (this is our SLA due date/time). I want to be able to send a notification 5 minutes before we hit the SLA due time. 
The notification (either an outbound message or an email alert) should be sent at 8.10AM, 5 mins before the SLA due date/time: 8.15AM.

I know there are Workflows and time-based action, but would it be more accurate doing in an APEX class? if so? how? 
How can I also repeat the notification many times?

Thank you.
GC

Dear Team,
I need to trigger an APEX Trigger class only to a subset of Cases which oddly my APEX Batch class skipped. 
In my production environment, I have opened the Developer Console window --> Open Execute Anonymous Window and pasted the following code. By calling 'update cc' I will trigger the Case Trigger. However, I get the error in the snapshot.

My questions:
1) How can I run my apex batch class ONLY on the cases that were missed?
2) Is there a way to call the Apex instruction without generating the "Too Many SQL Queries" message?
Thank you.
GC
 
List<case> ccL = [SELECT CreatedDate, Met_SLA_2__c FROM Case WHERE ((CALENDAR_YEAR(CreatedDate) >= 2016) AND (Met_SLA_2__c = null) )];

System.debug('Size List: ' + ccl.size());

for (Case cc: ccL){
    update cc;
}


User-added image


 
I have implemented web-to-case + entitlements / service contracts and an entitlement process.
How can I automatically create and assign an entitlement to a case? I now have to do it manually and only then does it trigger the entitlement process with the relevant processes. In my use case it concerns a case that needs to be picked up after 60 minutes when it is in the queue. I can assign an escalation rule but I would rather work with an entitlement process as you can add other milestones in the process to resolve the case according to SLA settings.