• $
  • NEWBIE
  • 5 Points
  • Member since 2014
  • SFDC
  • Alien Cop

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 6
    Replies
Hello , 

When I try to complete a superbadge "Apex specialist" , shows me a error message and does not login to my org:

The error message is:

"Houston, we have a problem.
You are attempting to log into Trailhead to complete challenges with an org that isn't supported.
Please make sure that your Org is
A Developer Edition Org (it cannot be a Production or Sandbox Org) and
The Developer Edition Org does not have a namespace assigned to it."


I do have a namespace in my org. If required I can delete them as well. Can anyone help me please?
 
  • June 08, 2018
  • Like
  • 0
Hello All, 

I have a small question related to deployment.
The scenario is, I am deploying a class and a trigger, and there are users working on the system already.
The class and trigger updates the Stage field on the primary object. So if a user is working on the system on a record, and i deploy it to production, is there a thing like the current record where the usr is working wont be affectd as it will hold the old logic in class in its temporary memory. Or the Status update would malfunction due to the deployment of code/ throw error as it does throw errors to users when we deploy visualforce pages.
How does it work?
Any help is highl;y appreciated.
  • May 17, 2018
  • Like
  • 0
Hello Folks, 


I have a batch class that generates a report add it to excel as attachemnt and then sends email. 
I have checked the apex jobs and all the batches gets processed in chunks in the execute method. Like for example there are 20,000 records. I am processing in 200 and all the batches gets processed which i see in apex jobs. Now when it consolidates all the chunks into one excel spreadsheet, it is running out of CPU time limit because its taking too much time in the finish method. 

My code is below:

global class SendEmailBatcher implements Database.Batchable<sObject>, Database.Stateful{

   global List<Task__c> lstTil;
  
   global SendEmailBatcher(){
   lstTil = new List<Task__c> ();
   }

   global Database.QueryLocator start(Database.BatchableContext BC){
      return Database.getQueryLocator([select id,Item__c,  Goods__c ,Goods__r.Name, Name , Stage__c , At_Ease__c , TEO_Available__c ,Map_Stage__c ,R_Verify__c 
                    from Task__c where Stage__c !='AC-00 Tape Loaded, not in Sample' AND Stage__c !='Low' AND 
                    Item__c !='K1' and Item__c != 'Test']);
   }
   
   global void execute(Database.BatchableContext BC, List<sObject> scope){
   
   List<Task__c> Tils = (List<Task__c>)scope;
   
   for (Task__c ol: Tils) {
   lstTil.add(ol);
   }
   
   }

global void finish(Database.BatchableContext BC){
   
   try {
      
      if(!lstTil.IsEmpty()){
      String generatedCSV = ''; 
      String FileRow = '';
      
       
         FileRow = '';
         FileRow = FileRow +','+'Item';
         FileRow = FileRow +','+'TISCO';
         FileRow = FileRow +','+'TEO Number';
         FileRow = FileRow +','+'At Ease';
         FileRow = FileRow +','+'TEO Available?';
         FileRow = FileRow +','+'Map Stage';
         FileRow = FileRow +','+'Records Verify';
         FileRow = FileRow +','+'Stage';
         FileRow = FileRow.replaceFirst(',','');
         generatedCSV = generatedCSV+FileRow +'\n';
         
         for(Task__c ol: lstTil){
             
             FileRow = '';
             FileRow = FileRow +','+ol.Item__c;
             FileRow = FileRow +','+ol.Goods__r.Name;
             FileRow = FileRow +','+ol.Name;
             FileRow = FileRow +','+ol.At_Ease__c ;
             FileRow = FileRow +','+ol.TEO_Available__c ;
             FileRow = FileRow +','+ol.Map_Stage__c;
             FileRow = FileRow +','+ol.R_Verify__c ;
             FileRow = FileRow +','+ol.Stage__c ;
             FileRow = FileRow.replaceFirst(',','');
             generatedCSV = generatedCSV+FileRow +'\n';
         }
         
        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
        Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
           efa.setFileName('TEO Data Report.csv');
           Blob b = blob.Valueof(generatedCSV);
        efa.setBody(b);
        String[] EmailIds = Label.TEOReport.split(',');

        String[] ccAddresses=EmailIds;
        email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});
        email.setSubject('TEO Data Report');
        email.setHtmlBody('All,<br/><br/> Please find the Attached Report.<br/><br/>');
        email.setToAddresses(ccAddresses);
        if(!test.IsrunningTest()){
        Messaging.sendEmail(New Messaging.SingleEmailMessage[]{email});
        }
   }
   }
   catch (Exception Ex) {
   system.debug(Ex);
       
       Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
        List<string> EmailIds = new List<string>();
        EmailIds.add(userInfo.getuseremail());

        String[] ccAddresses=EmailIds;
        email.setSubject('Error In TEO Data Report');
        email.setHtmlBody('All,<br/><br/> Please find the Error.<br/><br/>'+ex.getmessage());
        email.setToAddresses(ccAddresses);
        if(!test.IsrunningTest()){
        Messaging.sendEmail(New Messaging.SingleEmailMessage[]{email});
        }
   }
   
   }
}



Something is stopping in the consolidation of different batches into one excel report. Because I see that all batches are processed in execute method.  But finish method is causing the issue.
  • May 17, 2018
  • Like
  • 0
Hello All, 


I am stuck at a place where I need to show some unique values based on a query. Any help is most welcome.

I have  a junction Object: RP Breach that connects Review Plan and Breach. 

Now in this query I want to show the unique breaches in the rp breaches that each review plan holds. Review Plan to Breach is many to many relationship junctioned by a RP Breach. RP Breach is always unique but same breach can be associated with a unique RP Breach

Example

Review Plan         Rp Breach       Breach
    A                         1111               X
   B                          2222              X  
   C                          3333              X
   D                          4444              X
   E                          5555              O


Now the result in the query should show X,O.

Currently it is showing , X,X,X,X O because it is based on the RP Breach ID which is unique. 

RP Breach has relation with Breach .  And RP Breach has relation with Review Plan. 

We need to show X,O.... But here X is repeated because of RP Breach. How can we query based on The Unique breach associated with the RP Breach.

More Explanation on the above roadblock:

We have review plans, and based on the review plan we are querying RP Breaches. Currently we are getting all RP Breaches related to those review plans. For example,
For 4 Review Plans, we are getting 30 RP Breaches. In those 30 RP Breaches, we are taking unique breaches and showing in the front end. But we need to take the unique breaches available for those review plans.  Because RP Breaches are unique but the Breach Identifiers inside the unique RP Breaches are repeated. This is where I got stuck up.
Here availableRP  means a set of selected review plan IDs. All I am trying to get is the breaches associated with the 4 review plans.
 
 
Any help would be highly appreciated.
 
  • September 22, 2016
  • Like
  • 0
Hello Team SFDC,

I am currenly logged into my production and I am receiving an error message on my screen whenever I am trying to work on my case management screen. This is happening in production and na23 server. Is anyone else expereincing the same errors now.  I have pasted the errror picture below. Please help if you have encountered this error before. Any suggestions will be of great help.

User-added image
Thanks in advance.
AC.
  • July 25, 2016
  • Like
  • 0
I have an application in salesforce that has custom objects, rules, triggers, visualforce pages and controllers.

Now I do not want to make much changes in code as they are huge. 
Is there any way I can transfoirm my existing application in salesforce to Lightening Experience. / Lightening App.? 


Pleasee guide me. 


Also, 

What are the limitations of Professional License and how is it different from Enterprise License.  Can you list them for me please. 


Thanks in Advance.
<Apex:Alien>
  • July 22, 2016
  • Like
  • 0
How can I get the same look and feel and color on an output labe from field color and font and . Names in my field are gray, while in my output label its black . I want it gray. How to achieve it?
  • April 11, 2016
  • Like
  • 0
As my VFP is too long, I would like to have a floating save and cancel button. Is it possible? If Yes, Please let me know how :) 

Thanks in advance. 
  • April 11, 2016
  • Like
  • 0
I have a vfp button that redirects to a standard page on a custom object which is child object of a master object. Now the condition is, on clicking of the button it would take user to a new record insert screen and users can insert their record. However if there is already a record in the child object, instead of going to the new screen it would take user to detail page on click of that button. 

Can anyone please help me to use this functionality in one button. Right now it goes to the new screen only. 

<apex:pageBlock title="Inferno:" >
            <apex:pageBlockSection >    
                <apex:outputPanel >
                    <apex:outputLabel />
                    <apex:outputLabel />
                    <apex:outputText ><b>Inferno Page: </b></apex:outputText>
                    <apex:commandButton value="Inferno Screen" oncomplete="window.open('/a1a/e?{!$Label.Inferno_ID}={!Clover__c.Name}&{!$Label.Inferno_ID}_lkid={!Clover__c.Id}&retURL=%2F{!Clover.Id}','_parent')"  />  </apex:outputPanel>
            </apex:pageBlockSection>


Clover is the master object. 
  • April 11, 2016
  • Like
  • 0
Hello , 

When I try to complete a superbadge "Apex specialist" , shows me a error message and does not login to my org:

The error message is:

"Houston, we have a problem.
You are attempting to log into Trailhead to complete challenges with an org that isn't supported.
Please make sure that your Org is
A Developer Edition Org (it cannot be a Production or Sandbox Org) and
The Developer Edition Org does not have a namespace assigned to it."


I do have a namespace in my org. If required I can delete them as well. Can anyone help me please?
 
  • June 08, 2018
  • Like
  • 0
Hello All, 


I am stuck at a place where I need to show some unique values based on a query. Any help is most welcome.

I have  a junction Object: RP Breach that connects Review Plan and Breach. 

Now in this query I want to show the unique breaches in the rp breaches that each review plan holds. Review Plan to Breach is many to many relationship junctioned by a RP Breach. RP Breach is always unique but same breach can be associated with a unique RP Breach

Example

Review Plan         Rp Breach       Breach
    A                         1111               X
   B                          2222              X  
   C                          3333              X
   D                          4444              X
   E                          5555              O


Now the result in the query should show X,O.

Currently it is showing , X,X,X,X O because it is based on the RP Breach ID which is unique. 

RP Breach has relation with Breach .  And RP Breach has relation with Review Plan. 

We need to show X,O.... But here X is repeated because of RP Breach. How can we query based on The Unique breach associated with the RP Breach.

More Explanation on the above roadblock:

We have review plans, and based on the review plan we are querying RP Breaches. Currently we are getting all RP Breaches related to those review plans. For example,
For 4 Review Plans, we are getting 30 RP Breaches. In those 30 RP Breaches, we are taking unique breaches and showing in the front end. But we need to take the unique breaches available for those review plans.  Because RP Breaches are unique but the Breach Identifiers inside the unique RP Breaches are repeated. This is where I got stuck up.
Here availableRP  means a set of selected review plan IDs. All I am trying to get is the breaches associated with the 4 review plans.
 
 
Any help would be highly appreciated.
 
  • September 22, 2016
  • Like
  • 0
If you or someone you know is a contract SFDC developer, please contact me at your earliest convienience.  This is not a post for fulltime employment but for contract work on various projects over extended periods of time.  Pay DOE and negotiable.  Reply or contact me directly.  Thanks.

When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.  

 

That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it.