• Ashima nidhi
  • NEWBIE
  • 59 Points
  • Member since 2020
  • Ms


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 8
    Questions
  • 29
    Replies
Good afternoon all,

I am new to programming and could use a little help with something.

I have a trigger where I need to find and use a custom object record that has the same field value as the opp that fires the trigger.

The Opp have a custom formula field that shows the quarter when the opp was opened. (Q2-2019).

I need to use that value to find a record in a custom object that has that same value in one of it's field.

Note, there will never be more than one match.

But I have no idea how to do that.

Can anyone offer me some suggestions?

Thanks much,
Steve
Hi all,
i need an advice: 
I'm working on a Flow, the user fills data (input text, checkbox, upload image).
How can i display all filled data on summary screen at the end of flow?
Someone has some ideas?

thanks to all.
Davide
I am calling a wrapper class fro visual Flow . Passing List of sobject type from the flow .
However on run time I am facing the below error :
A field wasn't found or isn't supported for Apex action controller_class : abc__c.sobjectType

I am using the below wrapper class for input , Is the custom object not allowed to call from visualflow:
 
@InvocableMethod(label = 'Invoke test')
    public static List<FlowInputsRslt> invokeTest(List<FlowOutputs> request)
    {

}
 public class FlowOutputs
    {
        @InvocableVariable
        public String Details;

        @InvocableVariable
        public List<abc__c> Rec;
    }
I want to add validation on visualflow , Stopping to go on next screen,
The validation is on the basis of lightning component embedded and having certain attribute check.

I can use that attribute in visualflow but other than custom footer is there other way to add that validation
I am adding and removing the row dynamically using list iteration.
 
<aura:iteration items="{!v.accList}" var="abc" indexVar="index">
<td>
 <lightning:input aura:id="abc-start-date" name="accName" type="date" required="true"  label="Date From" value="{!abc.Start_Date__c}" />
</td>
<td colspan="3">
<lightning:textarea aura:id="abc-comment"  name="accComment" label="Comment" value=" 
{!abc.Comments__c}" placeholder="Comments"/>
</td>
</aura:iteration>



at helper/controller
 
for (var i = 0; i < accList.length; i++) {
 conditioncheck
 component.find('abc-comment').setCustomValidity("Comments can't be blank.");
 component.find('abc-comment').reportValidity();
}

However, for multiple record it is failing as the abc-comment are multiple on the basis of list. Is there any way to put the validation message on the basis of record for which error/validation needs to be thrown
I am passing the values from lightning component to flow using Design Attribute.

On Loading Flow 1 Screen, I am not getting the values of that attribute passed from lightning component to flow , But when I click on next i.e screen I can see the same value.

Again if I click previous then the values are getting blank.

Is there anything i am doing wrong
I am working on a requirement to use some values from one object in my Visual flows.
However those values I want to use I need to fetch on the basis of certain set of field values I already have stored somewhere in label etc.
I am checking best option as well as how to implement as in passing all vales from a controller and then using it in the flow or in the flow retrieving the same.
Please suggest best and how?
I am working on using the flow to get list of records on the basis of ID/Name stored in a label. I have created a formula field which picks up that label and using that formula I am trying to fetch records in Flow in getrecord.

However this is not working , Is that even possible if not what is the other way around. I do not want to make them static as well as I do not want to pass information from class to the flow
0
I was using various method to get the values related to an object inside a visual flow. Supposing I need to get name from object A__c inside my visual flow. I have option like getting the valie from lightning component passed to a flow or using inbuilt method like getRecords. However is there any way to get the values directly on the basis of name field already been present. For example: A__c is the object , And I am getting all the values inside the variable {!allValues}.
How to get the name field with the value 'ABC' for the object using the {!allValues}.Do iteration is required in this case also?
I am building a form which in the end is having some declaration which needs to be checked by the user in order to go to the next screen. Unable to get the same using checkbox and have used checkbox group however even in checkbox group selection of one is mandatory.
Is there any way to have all needs to be checked to move to the next screen As group is having only one marked as required condition
I am calling a wrapper class fro visual Flow . Passing List of sobject type from the flow .
However on run time I am facing the below error :
A field wasn't found or isn't supported for Apex action controller_class : abc__c.sobjectType

I am using the below wrapper class for input , Is the custom object not allowed to call from visualflow:
 
@InvocableMethod(label = 'Invoke test')
    public static List<FlowInputsRslt> invokeTest(List<FlowOutputs> request)
    {

}
 public class FlowOutputs
    {
        @InvocableVariable
        public String Details;

        @InvocableVariable
        public List<abc__c> Rec;
    }
I want to add validation on visualflow , Stopping to go on next screen,
The validation is on the basis of lightning component embedded and having certain attribute check.

I can use that attribute in visualflow but other than custom footer is there other way to add that validation
I am passing the values from lightning component to flow using Design Attribute.

On Loading Flow 1 Screen, I am not getting the values of that attribute passed from lightning component to flow , But when I click on next i.e screen I can see the same value.

Again if I click previous then the values are getting blank.

Is there anything i am doing wrong
Good afternoon all,

I am new to programming and could use a little help with something.

I have a trigger where I need to find and use a custom object record that has the same field value as the opp that fires the trigger.

The Opp have a custom formula field that shows the quarter when the opp was opened. (Q2-2019).

I need to use that value to find a record in a custom object that has that same value in one of it's field.

Note, there will never be more than one match.

But I have no idea how to do that.

Can anyone offer me some suggestions?

Thanks much,
Steve
I started getting SDFC Expiring Certificate Notification. I would like to know what this Certificate is used for. I had never activated it from my side. What will be the impact if I create a new Self-signed certificate and disable the current one. 
I am creating a visualforce pdf document and  I am using the Account standard object. There are three record types Site, Customer and Vendor.

This text field is on the Site account records with account record type of Site.  This field I have on my VF page is Account.Service_Agreement_Verbiage__c. When i go to test this field no information is displayed even though the text field does have text entered into it

Is this because of the record type? It seems like it should be straight forward. Any help would be greatly appreciated. 
  • March 23, 2020
  • Like
  • 0
Hi,

I have a requirement,have to show Custom object activity in contact related list.::
Contact and Custom__c,In this custom object I have to show activity of contacts.

Thanks.
Hi,

How to display activity for related object in contact object.
Is there any configuration way to show.,or how to do using custom component.
 
Hi, anybody can help me why I have an error in my code at line 5
public class ContactController {

    
    Profile PROFILE = [SELECT Id, Name FROM Profile WHERE Id=:userinfo.getProfileId()];
   
    if(Profile.ID == '00e1i000000p80k') {
        u.addError('You are not allowed to create contact from this button');
    }
    Else {
        public PageReference saveNew() {
    
   		 try { 
    	    insert Contact; 
   			 } catch(System.DMLException e) {
       		  ApexPages.addMessages(e);
              return null;
   			 }   

   		 return (new ApexPages.StandardController(new Contact())).edit();        

   		}
    }
  
}

On the line: if(Profile.ID = '001i00000p80k')  I have this error
Expecting '}' but was: 'if'

 
I need to Query a user in Apex class.
Consider the user having permission set Permission1, Permission2 , Permission3

The permission1 has all the fields in Object ABC readonly but has Modify All access since user need access for notes and Attachment.(By modify all user also get Delete Access)

Need to Ristrict the user from the deleting Object if Only Permission1 assigned.
Pemission2 and Permission3 gives modify access to the ABC and when assigned to user along with permission1 the error should not be thrown.
each permission set have different purpose but i need to restrict user from deleting the record only when Permission1  is assigned.

could you help me how can i filter this user using Query on permissionset Object using permission set name.

 
This is my Class
-------------------
trigger trgStudentSchoolFields on Student_School_Fields__c (after insert, after update){
    String IntegrationUser = System.Label.IntegrationUser;
    map<string,string> mapContacts = new map<string,string>();
    list<Contact> listOfContact = new list<Contact>();
    list<Inquiry__c> inquiryList = new list<Inquiry__c>();
    list<Opportunity> oppList = new list<Opportunity>();
    String uid = userinfo.getUserId();
    String IntgUser;
    system.debug('USERID>>>' + uid);
    system.debug('IntegrationUser>>>' + IntegrationUser);
    list<Contact_Method__c> cmlist=new list<Contact_Method__c>();
    Set<string> stdscmid = New Set<string>();
    List<Error__c> errconlst = New List<Error__c>();
    List<Error__c> errlst = New List<Error__c>();  
   // if (!uid.contains(IntegrationUser))
   // {
    if(userinfo.getUserId() != '00555000003neB6'){
        list<Student_School_Fields__c> lstSchStud=new list<Student_School_Fields__c>();
        for(Student_School_Fields__c schstudobj:trigger.new)
        {
            stdscmid.add(schstudobj.id);
            lstSchStud.add(schstudobj);
            mapContacts.put(schstudobj.Contact__c, schstudobj.Student_Enrollment_Campus__c);
        }
        errconlst = [select ErrorCode__c, Error_Message__c, Error_Type__c, ObjectType__c, Status__c,
                     ContactRelated__c, OpportunityRelated__c, APIOperation__c
                     From Error__c 
                     Where Error_Type__c = 'Data' 
                     AND Status__c = 'Failed' 
                     AND ObjectType__c = 'StudentSchoolFields'
                     AND StudentSchoolFieldRelated__c IN :stdscmid];
        for (Error__c errobj:errconlst)
        {
            errobj.Status__c = 'Processed';
            errlst.add(errobj);
        }
        if (errlst.size() > 0)
            update errlst;
        
        if(mapContacts.size()>0 && !mapContacts.isEmpty()){
            for(Contact con : [SELECT Id, Student_Enrollment_Campus__c FROM Contact
                               where  id IN:mapContacts.keySet()]){
                                   string enrollment = mapContacts.get(con.id);
                                   System.debug('con'+con);
                                   System.debug('enrollment'+enrollment);
                                   if(enrollment != null){
                                       con.Student_Enrollment_Campus__c = enrollment; 
                                       listOfContact.add(con);
                                   }
                               }
            
            for(Inquiry__c inquiry : [SELECT Id, Student_Student_Enrollment_Campus__c, Contact__c FROM Inquiry__c
                                      where  Contact__c IN:mapContacts.keySet()]){
                                          System.debug('inquiry'+inquiry);
                                          string enrollment = mapContacts.get(inquiry.Contact__c);
                                          if(enrollment != null){
                                              inquiry.Student_Student_Enrollment_Campus__c = enrollment; 
                                              inquiryList.add(inquiry);
                                          }
                                      }
            for(Opportunity opp : [SELECT Id, ContactId , Student_Enrollment_Campus__c FROM Opportunity where
                                   ContactId  IN:mapContacts.keySet()]){
                                       System.debug('opp'+opp);
                                       string enrollment = mapContacts.get(opp.ContactId);
                                       if(enrollment != null){
                                           opp.Student_Enrollment_Campus__c = enrollment; 
                                           oppList.add(opp);
                                       }
                                   }
            if(listOfContact.size()>0 && !listOfContact.isEmpty()){
                TrgInquiryHandler.isStudentSchoolStopTriggerContact=true;
                update listOfContact;
            }
            if(inquiryList.size()>0 && !inquiryList.isEmpty()){
                update inquiryList;
            }
            if(oppList.size()>0 && !oppList.isEmpty()){
                TrgInquiryHandler.isStudentSchoolStopTriggerOpp=true;
                update oppList;
            }
        }
        string jsonstr=JSON.serialize(lstSchStud);
        
        if(Trigger.isAfter && Trigger.isInsert || Trigger.isAfter && Trigger.isUpdate )
        {   if(!System.isFuture() && !System.isBatch())
            studentSchoolFields.updateSchfldStudentsCVUe(jsonstr);
        }
   // }
        }
}


Test Class 
=============
@isTest
Public  class trgStudentSchoolFieldsTestClass {  
    public static testmethod void contactmethodtest(){
    
       set<string> conid=new set<string>();
        
        Contact con =new Contact();
        con.lastname = 'testmore';
        con.Subscribe_To_SMS_Service__c=true;
        con.Student_Enrollment_Campus__c = 'AUR';
        insert con;
        
        Inquiry__c  inq = new Inquiry__c();
        inq.Name = 'inasfewna===100years====createNewInq';
        inq.Student_Student_Enrollment_Campus__c = 'ONL';
        inq.Contact__c = con.id;
       // insert inq;

        
        Contact_Method__c cm=new Contact_Method__c();
        cm.Name='test';
        cm.Contact__c=con.Id;
        cm.Subscribe_To_SMS_Service__c=true;
        insert cm;
        conid.add(cm.id);
    }
    }
This test class is not Code Coverage in my Class were i am missing i am not understand can you please any one help me
Hi all,
i need an advice: 
I'm working on a Flow, the user fills data (input text, checkbox, upload image).
How can i display all filled data on summary screen at the end of flow?
Someone has some ideas?

thanks to all.
Davide
Hi, I want to send an email which contains attachment related to contact and some contact merge fields. Can someone help me how to do this using batch apex...
  • March 19, 2020
  • Like
  • 0

Hi All

 Looking for a functionality which can show an Actionable popup message on lighting page (ok and cancel), when removing a related record from Standard Related record Component with out using a custom component.

 
  • March 19, 2020
  • Like
  • 0

Hi we are experiencing intermittent outages where when we try to open login.salesforce.com it just says cant be reached. We even tried to ping the site and didnt work. To make sure this is not something related to our network, we tried to reach the site from an Azure VM and the issue is still happening. The trust.status shows no incidents.

This is affecting our integration as well i believe, we have a SQL Server integration with Salesforce using DBAmp software and it is constantly failing as it is unable to reach Salesforce server. This is the error

- "Error 5103 : FAHttp::Send::WinHttpSendRequest Win32Error:: The server name or address could not be resolved "

 

Executed as user: SIMPLYENERGY\SQLServerServiceNew. ... --- Starting SF_Refresh for Invoiceable__c V3.6.7 [SQLSTATE 01000] (Error 0) 11:05:04: Using Schema Error Action of yes [SQLSTATE 01000] (Error 0) OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 5103 : FAHttp::Send::WinHttpSendRequest Win32Error:: The server name or address could not be resolved ". [SQLSTATE 01000] (Error 7412) 11:05:04: Error: Unable to validate object: Cannot initialize the data source object of OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE". [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 42000] (Error 50000) --- Starting SF_Refresh for Invoice_Number__c V3.6.7 [SQLSTATE 01000] (Error 0) 11:05:04: Using Schema Error Action of yes [SQLSTATE 01000] (Error 0) OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 5103 : FAHttp::Send::WinHttpSendRequest Win32Error:: The server name or address could not be resolved ". [SQLSTATE 01000] (Error 7412) 11:05:04: Error: Unable to validate object: Cannot initialize the data source object of OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE". [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 42000] (Error 50000) --- Starting SF_Refresh for Invoice_Line_Item_History__c V3.6.7 [SQLSTATE 01000] (Error 0) 11:05:04: Using Schema Error Action of yes [SQLSTATE 01000] (Error 0) OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 5103 : FAHttp::Send::WinHttpSendRequest Win32Error:: The server name or address could not be resolved ". [SQLSTATE 01000] (Error 7412) 11:05:04: Error: Unable to validate object: Cannot initialize the data source object of OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE". [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 42000] (Error 50000) --- Starting SF_Refresh for ICP_Contract_Join__c V3.6.7 [SQLSTATE 01000] (Error 0) 11:05:04: Using Schema Error Action of yes [SQLSTATE 01000] (Error 0) OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 5103 : FAHttp::Send::WinHttpSendRequest Win32Error:: The server name or address could not be resolved ". [SQLSTATE 01000] (Error 7412) 11:05:04: Error: Unable to validate object: Cannot initialize the data source object of OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE". [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 42000] (Error 50000) --- Starting SF_Refresh for ICP__c V3.6.7 [SQLSTATE 01000] (Error 0) 11:05:04: Using Schema Error Action of yes [SQLSTATE 01000] (Error 0) OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 5103 : FAHttp::Send::WinHttpSendRequest Win32Error:: The server name or address could not be resolved ". [SQLSTATE 01000] (Error 7412) 11:05:04: Error: Unable to validate object: Cannot initialize the data source object of OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE". [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 01000] (Error 0) --- Ending SF_Refresh. Operation FAILED. [SQLSTATE 42000] (Error 50000) --- Starting SF_Refresh for Billing_Period__c V3.6.7 [SQLSTATE 01000] (Error 0) 11:05:04: Using Schema Error Action of yes [SQLSTATE 01000] (Error 0) OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 5103 : FAHttp::Send::WinHttpSendRequest Win32Error:: The server name or address could not be resolved ". [SQLSTATE 01000] (Error 7412) 11:05:04: Error: Unable to validate object: Cannot initialize the data source... The step failed.

 

I have a daily integration job, using Jitterbit Cloud Data Loader (the free version), that creates or updates products from an external system using a custom field set as External ID.  When a product is created, It must be associated or related to the standard Pricebook using PricebookEntry object. SF doesn't seem to do that automatically; I assume that is why one Pricebook is set as the Standard (IsStandard = true).  Looks like I need to do a second job to query Products not currently related to the standard price book and create an entry in PricebookEntry object for the missing ones.   In Jitterbit, I cannot use SF as the Source and the Target on the same job.  Using a Trigger on Product2 seems a little over the top for this.  I am sure others are integrating products and have solutions to share.  What is the best solution for doing this?  (I swear I so something like this on the certification exam)
I need to create a custom detail page button on the Case object.
When this button is clicked it validates data to be sent via JSON to API(external system)
When JSON is sent a success response should be received/confirmed
I have following things with me:
client_id
client_secret
Third party URL
What is the way to implement it please explain in detail. Thanks
Hi,

Currently I am making an apex callout to external system using a lightning component button,

It generates an external system id ( CustomerId)

As a part of my requirement, when I change Account - Name, GST, PAN and email it should go to the external system only if CustomerId is present on account.

It should update the same external id in external system

I understand, I will require a REST API integration to make this update call. can anyone help me in this







 
Hello! 
I'm super new to development workflow using Git and Visual Studio Code. In our company, the deployments of code and configurations are done via Azure Dev Ops CI/CD pipeline. When I deployed a new flow, everything went successfully. But when I try to revert my change, the revert feature branch fails to validate and I get the error 'insufficient access rights on cross-reference id'. The user account used in the pipeline has system admin profile so it doesn't seem access related. Any help would be appreciated!