• sridharb
  • NEWBIE
  • 35 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 26
    Replies

Hi Folks,
 

Could anyone have had success in making callout from Invocable methods which being meant for ChatBot. I mean from chat bot any possbility to find the results of API Call outs or Query from External Objects .

However I try I do not see any outcome of callouts or Query values of External Objects. I have given the chatbot related permission set to all necessary metadata types but no luck.

Just curious have any one tried and successfull. please share your experience. Thanks
Sridhar

Hi Folks,

Any thoushts well appreaciated.

Is it possible to impliment a non modal  window in Lightning experience like the Anonymous Window in Developer Console.

While Popu up window being opened Agent should be able to work on Background Live chat and Only one pop up should be allowed at any time. With the hopes there is solution, I am here posting and looking for your thoughts and inputs.


Thanks
Sri 
For Example 
If I have 2 attributes as like below defined with same type as 'Account' or any in a lightning component
<aura:attribute name="retainedCustomer" type="Account" access="public"/>
    <aura:attribute name="customerDetails" type="Account" access="public"/>
The reason i defined 2 same is,
Account will be displayed as the form with firstname and last name and mobile where allowed to view and edit. When operation for edit and in the middle of editing clicked on cancel button, so wanted to display back form with original values, so delcared one more attribute as Account which has been set on Init as the copy of customerdetails.

But thought form elements refers to customerdetail attribute from the component definition, retainCustomer attributes also reflecting to same values as CustomerDetails. Which is all because of same type. I experienced this problem with custom type attributes but its now look like the general defect from Lightning

Anyone experienced same problem oand any thoughts on it.

For more clear

This is what I was doing at Componet controllers
doInit : function(component, event, helper) {
        component.set("v.retainedCustomer",component.get("v.customerDetails"));
     },
when clicked on Cancel
 
component.set("v.customerDetails",component.get("v.retainedCustomer"));

but no luck seems like for work around i need to retain them indivudually to a colelction instead as same type Account.

Thanks
sri


 
User-added image
Hi Folks

Wondering do we hve any lighning options to have the actions at right corner of component as circled in Image for adding any view, edit or new Actions.

Thanks
Sri
Hi

I hope some one been through my situtation. Currently migrating a once salesforce on to one other salesforce instance. When Migrating Attachments I am facing a weird situation where I am Unable to find the work around. Could any one please help me..Any suggestions welcomed.

Scenario
I am migrating 7000 attachments of object 'Case', Obiviously any tool we use we have to pull down the files to local source and refer the path of the file while exporting to salesforce in 'Body' Field. And dealing with all attachments at time causes memory and time consuming never what error comes. So I am doing the migration of case object related Attchments in increamentally,  based on createddate date range of 3 months.

The problem I am facing is, Many times many files from differenct cases having same file name, So when I import a set of attachments on Windows platoform, It is replacing if any other case has simillar infact same name. But relistically both are different files belongs to different cases. Due to this Attachments record count most of the higher than the file count in my Target Folder on Windows.

In a Example. lets say 2 cases, case A and case B has 2 different attchments but same name like A1.pdf on Case A, A1.pdf on Case 2.  My generated Csv file containing 2 records and but target folder at Windows is containing only one file as Windows treating other duplicate and jsut replacing last file.

It is becoming hilgly Impossible to trace out when 1000 + files are there even shorten the criteria to 1 month. Does anyone come across of similar problem from any of their migration jobs. I am so greatful to any suggestions indeed please 

I am happy to describe more clearly if anything on my problem is not clear. 


Regards
S
Hi All,

Always I am starting Lightening excercise , but every time I am failing on first a component creaation step as I would not see Lightening styles in new page. From the guided pages I understand this CSS framework no more an unmanged package, its by default available on orgs. If so where I am doing wrong why I am not able to see the pages in lightening style.

Could some one please help to move ahead.

I atually download as a static resoure and refered in my page as like below.
<apex:stylesheet  url="{!URLFOR($Resource.SLDS405, '/assets/styles/salesforce-lightning-design-system-ltng.css'}"/>


 
Hi Folks,
I am trying to show events in calendar for 7, 14 and 31 days view (user an switch among). For me working on Lightening is very first time , so from the help of videos and articles I tried to do but always throws errors 'ud' component identified. looks debuging is not so convienient .

I beleieve this is possible but i am missing something can some one please give me any example code. or some tips.

Thanks
Sri
Hi All,  
my test class is given below:-
@isTest
private class CaseTriggerHelperTest {
        static testmethod void firstResponseTest(){
            
          String uniqueUserName = 'standarduser' + DateTime.now().getTime() + '@testorg.com';
        
        // This code runs as the system user
        Profile p = [SELECT Id FROM Profile WHERE Name='Standard User'];
        User u = new User(Alias = 'standt', Email='standarduser@testorg.com',
        EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US',
        LocaleSidKey='en_US', ProfileId = p.Id,
        TimeZoneSidKey='America/Los_Angeles',
        UserName=uniqueUserName);
    
        insert u;
        
        Account accRecord = new Account(Name='testAccount', Phone='9012312325'); //Provide all required field and its value here.
        
        Case caseRecord = new Case(Subject='TestRecord', Priority='High'); //Provide all required field and its value here.

        System.runAs(u) {
            insert accRecord;
            
            Case newCaseRecord;
            //For create event of trigger 
            caseRecord.AccountId = accRecord.Id;
            insert caseRecord;
            
            newCaseRecord = [SELECT Id, Priority FROM Case Where Id =: caseRecord.Id];
            System.assertEquals(newCaseRecord.Priority,'High');
             CaseTeamTemplate myCaseTeam = new CaseTeamTemplate();
            myCaseTeam.Name = 'TestName';
            myCaseTeam.Description = 'Test Description';
            insert myCaseTeam;

            
            //For update event of trigger
            caseRecord.Priority = 'Low';
            caseRecord.OwnerId = UserInfo.getUserId();
            update caseRecord;
            
            newCaseRecord = [SELECT Id, Priority FROM Case Where Id =: caseRecord.Id];
            System.assertEquals(newCaseRecord.Priority,'Low');
        }
        }
    
}
Showing me this error
System.SObjectException: Field is not writeable: CaseTeamTemplate.Name
Any suggestion ?
How to solve this issue?
Hi,
Am trying to create a simple Bot from Einstein Bot Builder,As per the instructions created and configured but 
1. When i click on Train Bot getting below error "Looks like your training job didn’t complete. Try again."
2. Status should be success to connect Bot ?
3. Getting below error when we do preview from builder.
Please share your thoughts/ Links if any one configured successfully.
User-added image
User-added image
User-added image

Reference :
https://www.salesforce.com/video/1756700/
https://www.youtube.com/watch?v=i9TbAkRNNa0



Thanks
Deepika
 
For Example 
If I have 2 attributes as like below defined with same type as 'Account' or any in a lightning component
<aura:attribute name="retainedCustomer" type="Account" access="public"/>
    <aura:attribute name="customerDetails" type="Account" access="public"/>
The reason i defined 2 same is,
Account will be displayed as the form with firstname and last name and mobile where allowed to view and edit. When operation for edit and in the middle of editing clicked on cancel button, so wanted to display back form with original values, so delcared one more attribute as Account which has been set on Init as the copy of customerdetails.

But thought form elements refers to customerdetail attribute from the component definition, retainCustomer attributes also reflecting to same values as CustomerDetails. Which is all because of same type. I experienced this problem with custom type attributes but its now look like the general defect from Lightning

Anyone experienced same problem oand any thoughts on it.

For more clear

This is what I was doing at Componet controllers
doInit : function(component, event, helper) {
        component.set("v.retainedCustomer",component.get("v.customerDetails"));
     },
when clicked on Cancel
 
component.set("v.customerDetails",component.get("v.retainedCustomer"));

but no luck seems like for work around i need to retain them indivudually to a colelction instead as same type Account.

Thanks
sri


 
User-added image
Hi Folks

Wondering do we hve any lighning options to have the actions at right corner of component as circled in Image for adding any view, edit or new Actions.

Thanks
Sri
Hello All,
I am trying to associate an existing related record(sales rebate__c) to another custom object when they are created(Sales program__c)
Below is what I have so far but I am receiving an error where I am comparing the year on the parent child record.  
There is only a single child(sales_rebate) record that will be associated to many parent accounts.  
Error Message "Initial term of field expression must be a concrete SObject: List<Sales_Rebate__c>"

Thanks for your time and help.
M


trigger AddSalesRebateToSalesProgram on Sales_Program__c (After insert) {
    
 List<Sales_Rebate__c> salesrebate = new List<Sales_Rebate__c>();
 List<Sales_Program__c> salesprogram = new List<Sales_Program__c>();
    
    for(Sales_Program__c sp : Trigger.new)
    {
      *if(salesrebate.Early_Buy_Rebate_Year__c == salesprogram.Current_SBF_Year__c )*
      {
           Sales_Rebate__c rebate = new Sales_Rebate__c();
            rebate.Sales_Program__c = sp.id;  
                  salesrebate.add(rebate);
      }
    }
   
    insert salesrebate;
}
 
Hi Everyone, 

My Scenario is need to restrict two users not able to see the visual force page in site. 

In my profile have 100 users  i given access profile level but i need to restrict perticuler users have no permission to view visual force page..

can you please guide me how to give restrict ?

 
My Formula field:
Total Time difference(Date/Time) = 
Date dCloseDate = System.CloseDate()
DateTime dt = datetime.newInstance(dCloseDate.year(), dCloseDate.month(), dCloseDate.day());
 Calculating_Date__c - dCloseDate;
I have a three field in the Opportunity field the Close Date, Total Time Difference and Calculating Date respectively.
Here I try to get the difference between the close date and Calculating Date.
but the close date is a date field and the Calculating date is a date/time field and the Total Time Difference is a Date/Time field.
So I have struggle to complete the task in getting difference in date and date/time fields so please help to solve this task.
For answers thanks in advance.
 
HI 
i am writing a trigger to create records in a custome object on a event. 
when insering i am getting error message : System.ListException: Before Insert or Upsert list must not have two identically equal elements

issue is these records can be duplicate i still need to insert them is there any way to insert duplicate records which are in the list?.
Hello, In our org we have different divisions each with their own sales reps that all sell to the same accounts.  Once a sale has been made, the Account Management team steps in and takes over and is in charge of maintaining renewals for the account.  Because products are broken out between different opportunities, the team has struggled to find an efficient way to let a customer know which of their subscriptions are coming up for renewal, without having to manually piece together the details from multiple opportunities manually.

To solve for this, I created a custom object call Renewal_Package__c.  This is a simple object that allows the team to link all related opportunities for an account to a package and then ideally, be able to generate an email with the details of all those opportunities broken out within it.  Renewal_Package__c has a Master-Detail relationship with Account, and a couple other custom fields where the user can enter in a date and a note about the package.  Because you can't have a Master-Detail relationship with the Opportunities object, i have a lookup field on Opportunities where you can lookup the Renewal Package and link it appropriately.  This lookup, then populates to the product level as well via a workflow rule.  With this setup, you can look at a Renewal Package record and see the related list for Opportunities as well as all the individual products from the opportunities.

Now the hard part - I'm trying to setup a Visualforce email template that pulls in a related list of all of those Opportunity Products.  Here is my code:
<messaging:emailTemplate subject="Your Upcoming Renewal" recipientType="User" relatedToType="Renewal_Package__c">
<messaging:htmlEmailBody >
<html>
<body>

 <br>Your subscriptions are expiring soon!  Please review the list of products below and let us know whether you'll be continuing your subscription with us, so that we can ensure you have no disruptions in access to the data you rely on.   </br>

 <h3>Expiring Renewable Products</h3>                  
        <table border="3" cellpadding="10" width="100%" >
            <tr > 
               <th>Product Name</th><th>Quantity</th><th>Unit Price</th><th>Start Date</th><th>End Date</th><th>Additional Details</th><th>Renewal Approved</th>
           </tr>
        <apex:repeat var="opp" value="{!relatedTo.Renewal_Package__r.Opportunitylineitems}">
           <tr>
               <td align="center">{!opp.PriceBookEntry.name}</td>
               <td align="center">{!ROUND(opp.Quantity,0)}</td>
               <td align="center">
                   <apex:outputText value="{0,number,$###,###,##0.00}">
                       <apex:param value="{!ROUND(opp.UnitPrice,0)}" />
                   </apex:outputText></td>                                                                
               <td align="center">
                   <apex:outputText value="{0,date, M/dd/yyyy}">
                       <apex:param value="{!opp.ServiceDate}" />
                   </apex:outputText></td>
               <td align="center">
                   <apex:outputText value="{0,date, M/dd/yyyy}">
                       <apex:param value="{!opp.Service_End_Date__c}" />
                   </apex:outputText></td>                   
               <td align="center">{!opp.Description}</td>  
               <td align="center"></td>                            
           </tr>
         </apex:repeat>
         </table>        
<p/>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

The error I receive is "Error: Invalid field Renewal_Package__r for SObject Renewal_Package__c", so it's failing at the first lookup in the related list table: <apex:repeat var="opp" value="{!relatedTo.Renewal_Package__r.Opportunitylineitems}">.

Is it possible to reference the opportunity and/or Opportunity products with how i have everything setup?  I've tried a few variations of the code, but it errors every time.

Any help would be appreciated.
Thank you in advance!
Hi,

Like i posted above wht is the difference between using Schema.RecordTypeInfo returned by Case.sObjectType.getDescribe().getRecordTypeInfos() and using 
 SOQL to query Case records in the org to get all the RecordType values available for Case 

I stumbled upon this question while going through a question to display all the available record types for a case Object. 

Regards
  • October 10, 2016
  • Like
  • 0
I saw TONS of errors like this in the web, most of them are related to double underscore (__).
I double and triple checked and i have no idea what am i missing, will appreicate if someone can assist.

Obviously, the API name of these fields are similiar - Can someone please point me what am I missing? 

Edit | Del Internal SummaryInternal_Summary__c Long Text Area(32768)  Tal Tsror, 10/6/2016 12:03 PM
Edit | Del Internal Summary HistoryInternal_Summary_History__c Long Text Area(32768)  Tal Tsror, 10/10/2016 3:41 PM

error
I'm trying to reference the product2 name from an opportunity record. However it's giving me this error and not allowing me to save the code.

"Invalid foreign key relationship: Opportunity.opportunitylineitem"

How should I be referencing this field?

global class OpOwnerOldService_Scheduled Implements Schedulable
    {
        global void execute(SchedulableContext sc)
        {
            sendEmailtoOppOwner();
        }

        public void sendEmailtoOppOwner()
        {
            List<Opportunity> listOpportunity = new List<Opportunity>();
            listOpportunity = [SELECT Id, OwnerId FROM Opportunity WHERE Id In (SELECT OpportunityId FROM OpportunityLineItem WHERE Product2.Make_unavailable_for_opps_and_proposals__c = TRUE)];

            for(Opportunity opp : listOpportunity)
            {
               Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

mail.setTargetObjectId(opp.OwnerId);
mail.setReplyTo('glenn.daly@live.com');
mail.setSenderDisplayName('Salesforce Support');
mail.setSubject('Historic Service attached to current opportunity : '+ opp.  );
mail.setPlainTextBody(opportunity.Id +' has been created.');
mail.setSaveAsActivity(false);
                
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
            }

            update listOpportunity;
        }
    }
this is my code.....


trigger FixCreator on Case (before insert) {
for (Case newCase : Trigger.new) {
if (newCase.SuppliedEmail != null) {
User trueCreator = [SELECT Id FROM User WHERE Email = :newCase.SuppliedEmail ORDER BY LastLoginDate DESC LIMIT 1];
newCase.CreatedById = trueCreator.Id; } } }




NEED HELP
Hi

I hope some one been through my situtation. Currently migrating a once salesforce on to one other salesforce instance. When Migrating Attachments I am facing a weird situation where I am Unable to find the work around. Could any one please help me..Any suggestions welcomed.

Scenario
I am migrating 7000 attachments of object 'Case', Obiviously any tool we use we have to pull down the files to local source and refer the path of the file while exporting to salesforce in 'Body' Field. And dealing with all attachments at time causes memory and time consuming never what error comes. So I am doing the migration of case object related Attchments in increamentally,  based on createddate date range of 3 months.

The problem I am facing is, Many times many files from differenct cases having same file name, So when I import a set of attachments on Windows platoform, It is replacing if any other case has simillar infact same name. But relistically both are different files belongs to different cases. Due to this Attachments record count most of the higher than the file count in my Target Folder on Windows.

In a Example. lets say 2 cases, case A and case B has 2 different attchments but same name like A1.pdf on Case A, A1.pdf on Case 2.  My generated Csv file containing 2 records and but target folder at Windows is containing only one file as Windows treating other duplicate and jsut replacing last file.

It is becoming hilgly Impossible to trace out when 1000 + files are there even shorten the criteria to 1 month. Does anyone come across of similar problem from any of their migration jobs. I am so greatful to any suggestions indeed please 

I am happy to describe more clearly if anything on my problem is not clear. 


Regards
S
I am noticing that "click" event is not captured in the ui:message component.

My component:
<aura:component access="global">
 <ui:outputText value="simple text" click="{!c.onClick}"/>
 <ui:message title="Confirmation" severity="confirm" closable="true" click="{!c.onClick}">
   This is a confirmation message.
 </ui:message>
</aura:component>

My JS Controller:
({
    onClick: function(cmp) {
        alert("Clicked");
    }
})

Note that when I click on ui:outputText I do get the alert popup. But clicking on the ui:message does not give me the alert. 
According the lightning developer document, the ui:message is supposed to support click event.
Thank you for the help!