• Vijay Adusumilli
  • NEWBIE
  • 30 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 12
    Replies
I am getting the following error even though I have the application:

Challenge Not yet complete... here's what's wrong: 
We can't find a Lightning application named "Friends with Boats". Make sure you've created the Lightning application and named it correctly

I am able to invoke the application using:  https://brave-badger-292426-dev-ed.lightning.force.com/one/one.app#/n/Friends_with_Boats

I tried both the names of Friends_with_Boats and FriendswithBoats.

Please let me know what I am missing.

Thanks
I got the following error in the 4th Challenge:

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: JTKKEBHD

Does any body have hints on how to solve it.

Thanks


 
I have a requirement to update the account field (custom field), when a case is created or updated using the flow. I have existing flows .. I need to modify those ... How do I do that pls ? just give me for this requirement .. I will plugin this in the existing flow. thanks.
  • May 20, 2018
  • Like
  • 0
I created a very basic Trigger:

trigger HelloWorld on Lead (before update) {
    for (Lead L : Trigger.new) {
    L.FirstName = 'Hello';
    L.LastName  = 'World';
  }
}

When I create a new Lead record in Classic, it works as expected (ie, no change since it should fire only in Update) but when I create a new Lead record in Lightning, as soon as I save, the first and last name gets updated to Hello World.

This is a brand new developer Org and so there are no other triggers etc. Has anyone else run into this problem?
Req :Create the field called “Contact Relationship” checkbox on the Contact Object and create the object called “Contact Relationship” which is related list to the Contacts. (Look Up Relationship).
Now logic is when we create contact by checking contact relationship checkbox, then Contact Relationship will be created automatically for that contact.

Trigger :
trigger CreateChild on Contact (after insert) {
        set<id> conid = new set<id>();
        list<Contact_Relationship__c> con1 = new list<Contact_Relationship__c>();
        for (contact c : trigger.new){
        conid.add(c.id);
}
        List<contact> conlist = [select id,name from contact where id in : conid];
        for (contact c : conlist){
        if(c.Contact_Relationship__c == true){
        Contact_Relationship__c cr = new Contact_Relationship__c();
        cr.name = c.lastname;
        cr.contact__c= c.id;
        con1.add(cr);
}
}
        insert con1;
}
I got the following error in the 4th Challenge:

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: JTKKEBHD

Does any body have hints on how to solve it.

Thanks


 
For this section:

User-added image

Top does not show in the picklist.  How do I add it?
The challenge check is not correct. It is looking for permission set with label "Trailhead" but the tutorial asks to name it as
"Label the permission “2fa Auth for User Logins”."
Even after renaming the permission to Trailhead it did not pass
 
​I have been hitting this error with our Trigger implementation and I could use some help in figuring out how to deal with it.

We have a managed package that we expose through the AppExchange
  • Someone installs, we get a lead created by the License Management Application within our org.
  • I have Lead Trigger that runs  "After Create"
  • The trigger is queueing an @future task to callout to “our service”
However, the LMA seems to be running in the context of a user from a different organization, and the @future call that I have is also running in this same user context.
The result is an exception:
Apex script unhandled exception by user/organization: 005x0000000xxxx/00Dx0000000xxxx
Failed to invoke future method 'public static void Report(String, String)' on class 'TriggerCallback' for job id '707i00000xxxxxx'
caused by: System.CalloutException: Callout loop not allowed
Class.TriggerCallback.Report: line 109, column 1

From my reaing online,it seems the callout is failing because it is running as the user in the LMA, which is not a user in out organization.  

Can I ignore this? Are the other scenarios that my trigger will run in the context of an external user?
Can I detect this and suppress this without trapping ALL CalloutExceptions?

Any suggestions would be much appreciated
 
Hi,

  I was to convert data that is captured in custom object into account, opportunity and opportunity products. I am able to create account and opportunity I am facing issue in adding products to products not able add products please adive me what wrong am I doing in this code 
 
trigger DealReg_To_Opportunity on DealReg__c (After Insert)
{
 // asyncApex.processOpportunity(Trigger.newMap.keySet());
 
     Set<Id> idSet = Trigger.newMap.keySet();

    Account acc = new Account();
    Opportunity opp = new opportunity();     
     
    String Don = '00560000003W8gx';
    String Roger = '00560000004HPy1';
    String OppOwner;
    
    
  DealReg__c deal = [SELECT id, customer_name__c, deal_stage__c,
                            account_id__c, estimated_close_date__c,
                            estimated_value__c, competitor__c,
                            account__c, project_name__c,
                            distributor__c, reseller__c,
                            channel_source__c, discount_program__c,
                            ownerid, status__c, owner.type,
                            field_representative__c, theater__c,
                            Partner_Initiated__c,Partner_Led__c,K_12__c,Industry__c,Company_Url__c,Cloud_Deal_Registration__c,Product_Quantity__c,
                            Cloud_Product__c,Cloud_Service_Term__c,Cloud_Subscription_Term__c,
                            AP_Product__c,Service_Term__c,Subscription_Term__c
                        FROM DealReg__c
                        WHERE id = :idSet ]; 
   
  String Distributor;   
  String Region = deal.theater__c;
  String OppRecordType;
  
  /* Assign Opportunity Record type */
  if ( deal.Cloud_Product__c <> NULL ) 
  {
   OppRecordType = '0123000000094yHAAQ';
  }
  
  else if ( deal.Cloud_Subscription_Term__c <> NULL )
  {
   OppRecordType = '012g00000004qDPAAY';
  }
  
  /* Assign Opportunity owner */
  
  if ( Region == 'NAM') 
  {
     OppOwner  = '00560000004HPy1';
   }
  else if ( Region == 'EMEA')
  {   
     OppOwner = '00560000003W8gx';
   }
     
  
  /* Assign distributor */
  if ( deal.Cloud_Product__c <> NULL && deal.Cloud_Service_Term__c<> NULL )                 
   {
   Distributor =  deal.distributor__c ;    
   }                     
  else if ( deal.Cloud_Subscription_Term__c <> NULL && deal.theater__c == 'NAM'  ) 
   {
    Distributor = '0016000000pyLll'; // defaulting to westcon
   }
  else if ( deal.Cloud_Subscription_Term__c <> NULL && deal.theater__c == 'EMEA'  )
   { 
   Distributor = '0016000000YmDkh'; //defaulting to zyko
   }
   else if ( deal.Cloud_Subscription_Term__c <> NULL && deal.theater__c == NULL  ) 
   {
    Distributor = '0016000000pyLll'; // defaulting to westcon
   }

  String CloudPricebookId;
     
    /* Price Book */
    IF ( Region == 'NAM') 
    {
      CloudPricebookId = '01s60000000AKxZAAW';
    }
    ELSE IF ( Region == 'EMEA') 
    {
      CloudPricebookId = '01s60000000AKxUAAW';
    } 
    ELSE 
    {
      CloudPricebookId = '01s60000000AKxZAAW';
    }
    
  If ( deal.Cloud_Deal_Registration__c == 'Yes') 
   {                        
  acc.name = Deal.customer_name__c;
  acc.Industry = Deal.Industry__c;
  acc.Website = Deal.Company_Url__c;
  acc.Type = 'Prospect';
                  
  Insert acc;                      
   
        opp.AccountId = acc.id;     
        opp.RecordTypeId = OppRecordType;                
        opp.name = Deal.project_name__c +  ' ' +'FOR'+' '+deal.customer_name__c;    
        opp.OwnerId = '00560000004HPy1';
        opp.discount_program__c = 'DEALREG/PI/PL';
        opp.Abbv_Discount_Program__c =  'DR/PI/PL';  
        opp.StageName = Deal.deal_stage__c;
        opp.CloseDate = Deal.estimated_close_date__c;   
        opp.Primary_Competitor__c = deal.competitor__c;
        opp.type = 'Existing Customer';
        opp.Government_Contract__c = 'None';
        opp.leadsource = 'Deal Registration';
        opp.Partner_Driven__c = 'yes';
        opp.Partner_Account__c = Distributor;
        opp.primary_distributor__c = Distributor;
        //opp.primary_reseller__c = deal.reseller__c;
        opp.primary_reseller__c = Distributor;
        opp.channel_source__c = deal.channel_source__c;
        opp.K_12__c  = deal.K_12__c;
        opp.Renewal_Opportunity__c = 'No';
        opp.Renewal_Incumbant_Reseller__c = 'No';
        opp.Renewal_K_12__c = 'No';    
        opp.DEALREG_SEND_QUOTE__c = 'Do Not Send';
        opp.RENEWAL_SEND_QUOTE__c = 'Do Not Send';  
        opp.Partner_Driven__c  = 'Yes';
        opp.Partner_Led__c = 'Yes';     
        opp.deal_registration__c = deal.id; 
        opp.Partner_Initiated_International__c = 'No';  
        opp.Pricebook2Id    =   CloudPricebookId;                  
   
   insert opp; 
 
  
    
    String CloudProduct = deal.Cloud_Product__c; 
    String CloudServiceTerm = deal.Service_Term__c; 
    String CloudSubscription = deal.Subscription_Term__c;  
          
     
    List<OpportunityLineItem> oliList = new List<OpportunityLineItem>();
    
    List<PricebookEntry> pbeList = new List<PricebookEntry>();  
    
    
     pbeList = [SELECT Id, UnitPrice, Product2Id, priceBook2Id 
              FROM PricebookEntry 
              WHERE 
              Pricebook2Id = :CloudPricebookId AND 
              ( Product2Id = :CloudProduct or Product2Id = :CloudServiceTerm or Product2Id = :CloudSubscription)  ];
   
   if(pbeList.size() > 0 ){     
    
    for(PricebookEntry pbe: pbeList ){
    
       OpportunityLineItem oli = new OpportunityLineItem();
    
        oli.OpportunityId = opp.id;         
        oli.PricebookEntryId = pbe.id; 
        oli.Quantity = deal.Product_Quantity__c; 
        oli.UnitPrice = pbe.UnitPrice;
        oliList.add(oli);        
     
        }     
                               
        insert oliList; 
      }                                                                             

     
   }
}


Products are not getting added please suggest.

Thanks

Sudhir

Hi Everyone,

I have found muliple articles about this but nothing seems to work for me. I have a requriement to create a PDF form that has cursive writing on it. I have been tooling around with adding style sheets and inline style classes and even inline style attributes. Nothing I try seems to work. The font styles work on a regular visualforce page but as soon as I try to render the page as a PDF the font styles go away. I can't seem to get them to stay on the page when the visualforce page is set to render as a PDF. Is there a trick that will allow me to generate a PDF from the system and customize the font style. I guess it does not have to be a visualforce page but that's what I have tried so far. I have not looked into any other way to get this requirerment done. I have run up against a brick wall and can't seem to get around it.

Thanks for the help,
Danny
Hi,
I am using a custom button on lead detail page i.e. pop up and creating a pop window using javascript. That pop window has visualforce page to create new task. When i save the task it redirects me to task detail page. while i want when i click on save it redirect me to lead detail page and show the new task in open activity. please help me how do i redirect to lead detail page.

javascript code i am using on the custom button is given below:
{!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')} 
{!REQUIRESCRIPT('/js/functions.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/jquery-1.8.2.min.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/ui/jquery-ui-1.9.1.custom.min.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/postmessage/jquery.ba-postmessage.js')} 
{!REQUIRESCRIPT('/resource/jQueryForPopup/jQuery/bbq/jquery.ba-bbq.min.js')} 
requireCssFile('/resource/jQueryForPopup/jQuery/ui/css/ui-lightness/jquery-ui-1.9.1.custom.min.css'); 
function requireCssFile(filename) 

var fileref = document.createElement('link'); 
fileref.setAttribute('rel', 'stylesheet'); 
fileref.setAttribute('type', 'text/css'); 
fileref.setAttribute('href', filename); 
document.getElementsByTagName('head')[0].appendChild(fileref); 


var j$ = jQuery.noConflict(); 
var iframe_url = '{!URLFOR("/apex/vfPopup")}'; 
var child_domain = iframe_url.substring(0, iframe_url.indexOf('/', 9)); 
var parent_domain = window.location.protocol + '//' + window.location.host; 
var j$modalDialog = j$('<div id="opppopup"></div>') 
.html('<iframe id="iframeContentId" src="' + iframe_url + '" frameborder="0" height="100%" width="100%" marginheight="0" marginwidth="0" scrolling="no" />') 
.dialog({ 
autoOpen: false, 
title: 'Sample Popup', 
resizable: true, 
width: 800, 
height: 540, 
autoResize: true, 
modal: true, 
draggable: true 
}); 

j$modalDialog.dialog('open');

Visualforce code is given below:

<apex:page standardController="Task" sidebar="false">
    <apex:form >
      
        <apex:pageBlock title="Edit Task" id="thePageBlock" mode="edit">
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}" onComplete="closeModalDialog();"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>              
            </apex:pageBlockButtons>
            <apex:actionRegion >
                <apex:pageBlockSection title="Basic Information" columns="1">
                <apex:inputField value="{!Task.Ownerid}"/>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="Subject"/>
                            <apex:inputField value="{!Task.Subject}"/>
                    </apex:pageBlockSectionItem>
                    <apex:inputField value="{!Task.whoid}"/>
                    <apex:inputField value="{!Task.whatid}"/>
                </apex:pageBlockSection>
            </apex:actionRegion>

        </apex:pageBlock>
    
    </apex:form>
    <script type="text/javascript">
          
        function closeModalDialog() {
            var cross_result = new Object();
            cross_result.action = 'close_modal_dialog';
         
            if (cross_result.action == 'close_modal_dialog') {
            j$modalDialog.dialog('close');
            }
        } 
    </script>
    <!--<script>
        var returnURL;

        window.onload =  function(){
        returnURL = gup('retURL');
        //alert('Set retURL = ' + returnURL);
        
        };
        
        function gup( name ){  //this function just grabs HTTP params by name
        
        name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
        var regexS = "[\\?&]"+name+"=([^&#]*)"; 
        var regex = new RegExp( regexS ); 
        var results = regex.exec( window.location.href );
         if( results == null )    return ""; 
        else    return results[1];}
        
        function redirectBack(){
        //alert('Sending you back to ' + returnURL);
        window.location.href = '/' + returnURL;
        }
    </script>-->
</apex:page>