• Santosh Reddy Maddhuri
  • NEWBIE
  • 194 Points
  • Member since 2016


  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 33
    Replies
Hi all,

I need help figuring out why my visual flow is failing.  Here is the email error information:

Flow Interview Details
Interview Label: Sharing Contact with Breakthrough Role Associated BT Site 2/28/2018 11:37 AM
Current User: Holly Havelka (00533000004LpP0)
Start time: 2/28/2018 11:37 AM
Duration: 0 seconds

How the Interview Started
Holly Havelka (00533000004LpP0) started the flow interview.
Some of this flow's variables were set when the interview started.
varAssociatedBTSiteName = Atlanta
varAssociatedContact = 0031D000003HipNQAS

RECORD QUERY: Lookup_Associated_BT_Site_Role_ID
Find one UserRole record where:
DeveloperName Equals {!varAssociatedBTSiteName} (Atlanta)
Result
Successfully found record.
{!varAssociatedAffiliateSite} = 00E40000000kkg8EAA

RECORD CREATE: Share_Contact_Record_with_Associated_Affiliate_Site
Create one ContactShare record where:
ContactAccessLevel = Read
ContactId = {!varAssociatedContact} (0031D000003HipNQAS)
RowCause = Manual
UserOrGroupId = {!varAssociatedAffiliateSite} (00E40000000kkg8EAA)
Result
Failed to create record.

Error Occurred: This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: User/Group ID: id value of incorrect type: 00E40000000kkg8EAA.
Hi

on my last stage of opportunity, i have 2 checkboxes  
one closed won 
one closed loss
how can i manage to update the probability field in accordance to the checkboxes ? 
if the sales person check closed loss , i want the probabilty to switch to 0% 

 
I had my actual Gmail on Webassessor.com. I am doing Trailhead using Myname@companyname.com(not Actual email just a login name). But I verified Myname@companyname.com account using actual Gmail id(Which  I use on Webassessor).  So, I have question

1. Whatever I will complete on  Myname@companyname.com trailhead then It must show on my webassessor account then What I have to do.
2. Before using Myname@companyname account, I had done many badges using an old Email address which is not exist so can I merge that account on here.
Challenge Not yet complete... here's what's wrong: 
The BoatSearchResults JavaScript controller doesn't call the correct method. The controller must call helper.onSearch(), passing the component.


Anyone Completed this step Please help me with the Answer.
Hello, 

I have a formula that produces an outcome of either YES or NO. 

This formula will produce a NO if any of the selections are made. 

A YES would be produced if additional picklist items are selected (not shown). 

What i'm trying to do, is somehow make this formula shorter if possible? 

Would anyone know how to condense it? 

thanks!

 
IF(
OR(
AND(
NOT(ISPICKVAL([Account].productA, "")),
NOT(ISPICKVAL([Account].productA, "No Location"))
),
AND(
NOT(ISPICKVAL([Account].productAB, "")),
NOT(ISPICKVAL([Account].productAB, "No Location"))
),
AND(
NOT(ISPICKVAL([Account].productXY , "")),
NOT(ISPICKVAL([Account].productXY , "No Location"))
),
AND(
NOT(ISPICKVAL([Account].productEE, "")),
NOT(ISPICKVAL([Account].productEE, "No Location"))
)
), "Yes", "No")

 
  • January 10, 2018
  • Like
  • 0
This might be simple but I am unable to figure out what I am missing. I need to get Project Managers from the VF page and pass them in to my Query. Here is my Apex class and my VF page.
Class :
public class ProjectsFilterByDates{
public ProjectsFilterByDates(ApexPages.StandardController stdController) {
  }
  Date StartDate;
  Date EndDate;
  public String DateStringProperty{get;set;}  
  List<AcctSeed__Project__c> results;
  String[] ProjectManagers = new String[]{};
  public Date getstartDate(){
  return StartDate;
  }
  public Date getEndDate(){
  return EndDate;
  }
  Public List<AcctSeed__Project__c> getresults(){
  return results;
  }
  public void setStartDate(Date input){
  StartDate = input;
  }
  public void setEndDate(Date input1){
  EndDate = input1;
  }
  
     public List<SelectOption> getListOfUser(){
     List<User> Users = [select Name from user Where Project_Manager__c = true Order By Name ASC] ;
     List<SelectOption> options = new List<SelectOption>();
        for(User u : Users)
               {
                options.add(new SelectOption(u.Id , u.Name));
               }
                  return options;
                  }
  public String[] getProjectManagers (){
  return ProjectManagers;
  }
  public void setProjectManagers (string[] ProjectManagers){
  this.ProjectManagers = ProjectManagers;
  }   

  public PageReference Search(){
  results = [SELECT Name,UserID__c,AcctSeed__Account__r.Name,Date_Created__c,Construction_Manager__r.Name,AcctSeedERP__Manufactured_Product__r.Name,Project_Manager__c FROM AcctSeed__Project__c WHERE Date_Created__c >= :StartDate AND Date_Created__c <= :EndDate AND Project_Manager__c =:ProjectManagers order by Date_Created__c desc ];
  return null;
  }
}
VF Page:
<apex:page Standardcontroller="AcctSeed__Project__c" extensions="ProjectsFilterByDates" showHeader="false" sidebar="false" docType="html-5.0" language="en_Us" >
<apex:form >
<apex:pageBlock >
 Start Date: <apex:input type="date" value="{!StartDate}"/>
 End Date: <apex:input type="date" value="{!EndDate}"/>
<apex:selectList value="{!ProjectManagers}" size="5" multiselect="true">
<apex:selectOptions value="{!ListOfUser}"/>
</apex:selectList><p/>

<apex:commandButton value="Search For Projects" action="{!search}"/>
<apex:pageBlockTable value="{!results}" var="p">
<apex:column value="{!p.Name}"/>
<apex:column value="{!p.AcctSeed__Account__r.Name}"/>
<apex:column value="{!p.Project_Manager__c}"/>
<apex:column value="{!p.Date_Created__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
In My Existing VF code I’ve related list "Notes&Attachments" tied to Account
  <apex:relatedList subject="{!account}" list="NotesAndAttachments"   />  

Now i want to replace with Files and Notes.
     <apex:relatedList subject="{!account}" list="AttachedContentDocuments"  />   
      <apex:relatedList subject="{!account}" list="AttachedContentNotes"  />

Issues is with Notes - I’ve to set the API version above 35 in order to identify AttachedContentNotes object. If i do that, I’ll lose access to existing Notes&Attachment on VF Page, since above 36 version are not supported to notes and attachment.

How can i display both Notes&Attachment and AttachedContentNotes ? or what will be an ideal solution, the reason i want Note&Attachments is it has all historical data and other integration ties

Please Suggest,
Thanks In Advance
  • October 27, 2016
  • Like
  • 1
Hi All,

Am facing this issue on step 5 , can any one help me complete this challenge.

User-added image
Hi,
I can't test this class...
public class smscontroller {
    //Send SMS (Routee)
    @AuraEnabled
    public static void sendsms(String WhoId, String WhatId, String testo, String destinatario){    
        //Get Current User MobilePhone
        String mittente = [Select MobilePhone From User Where Id = :UserInfo.getUserId()][0].MobilePhone;
        mittente = mittente.deleteWhitespace();
		//Routee Authentication and Get Token
        Http http = new Http();
		HttpRequest request = new HttpRequest();
        request.setEndpoint('https://auth.routee.net/oauth/token');
        request.setMethod('POST');
        request.setHeader('authorization', 'Basic xxxxxxxxxxxxxxxxx');
        request.setHeader('content-type', 'application/x-www-form-urlencoded');
        request.setBody('grant_type=client_credentials');
		HttpResponse response = http.send(request);
        // Parse the JSON response
        if (response.getStatusCode() != 200) {
            System.debug('The status code returned was not expected: ' +
                response.getStatusCode() + ' ' + response.getStatus());
        } else {
            System.debug(response.getBody());
            String json = response.getBody();
			JSONParser parser = System.JSON.createParser(json);
                    while (parser.nextToken() != null) {
                        if(parser.getCurrentName() == 'access_token') {
                            parser.nextValue();
                            System.debug(parser.getText());
                            String access_token = parser.getText();
                            // Send SMS
                        	Http http1 = new Http();
                            HttpRequest request1 = new HttpRequest();
                            JSONGenerator body = System.JSON.createGenerator(true);
                            	body.writeStartObject();      
                                body.writeStringField('from', mittente);
                                body.writeStringField('to', destinatario);
                            	body.writeStringField('body',testo);
                                body.writeEndObject();    
                            String bodyS = body.getAsString();
                            request1.setEndpoint('https://connect.routee.net/sms');
                            request1.setMethod('POST');
                            request1.setHeader('authorization', 'Bearer '+ access_token);
                            request1.setHeader('content-type', 'application/json');
                            request1.setBody(bodyS);
                            HttpResponse response1 = http.send(request1);
                        	String json1 = response1.getBody();

                            //Insert Log Task
                            Task Task = new Task();
                            task.WhoId = Whoid;
                            task.WhatId = WhatId;
                            task.ActivityDate = system.today();
                            task.Subject = json1 ;
                            task.Description = json1;
                            insert task; 
                        }
                    }
        		}
    	}
}

Any ideas?
Thankyou
Hi all,

I need help figuring out why my visual flow is failing.  Here is the email error information:

Flow Interview Details
Interview Label: Sharing Contact with Breakthrough Role Associated BT Site 2/28/2018 11:37 AM
Current User: Holly Havelka (00533000004LpP0)
Start time: 2/28/2018 11:37 AM
Duration: 0 seconds

How the Interview Started
Holly Havelka (00533000004LpP0) started the flow interview.
Some of this flow's variables were set when the interview started.
varAssociatedBTSiteName = Atlanta
varAssociatedContact = 0031D000003HipNQAS

RECORD QUERY: Lookup_Associated_BT_Site_Role_ID
Find one UserRole record where:
DeveloperName Equals {!varAssociatedBTSiteName} (Atlanta)
Result
Successfully found record.
{!varAssociatedAffiliateSite} = 00E40000000kkg8EAA

RECORD CREATE: Share_Contact_Record_with_Associated_Affiliate_Site
Create one ContactShare record where:
ContactAccessLevel = Read
ContactId = {!varAssociatedContact} (0031D000003HipNQAS)
RowCause = Manual
UserOrGroupId = {!varAssociatedAffiliateSite} (00E40000000kkg8EAA)
Result
Failed to create record.

Error Occurred: This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: User/Group ID: id value of incorrect type: 00E40000000kkg8EAA.
Hi

on my last stage of opportunity, i have 2 checkboxes  
one closed won 
one closed loss
how can i manage to update the probability field in accordance to the checkboxes ? 
if the sales person check closed loss , i want the probabilty to switch to 0% 

 
I had my actual Gmail on Webassessor.com. I am doing Trailhead using Myname@companyname.com(not Actual email just a login name). But I verified Myname@companyname.com account using actual Gmail id(Which  I use on Webassessor).  So, I have question

1. Whatever I will complete on  Myname@companyname.com trailhead then It must show on my webassessor account then What I have to do.
2. Before using Myname@companyname account, I had done many badges using an old Email address which is not exist so can I merge that account on here.
Hi All,

Am facing this issue on step 5 , can any one help me complete this challenge.

User-added image
Hello,

This is driving me nutty so I'm really hoping someone can lend a hand.

I created a Visualfoce page. When I preview the page, one of the two input boxes shows.

When I navigate to the link while not logged into Salesforce, none of the input boxes show but the text and save button show. I have reviewed the guest access profile and believe I have set access to all the fields in the lead object.

I've consulted documentation and community questions and all seem to indicate a security setup issue. However, I'm not sure what else to check.

Any assistance would be greatly appreciated.

Thank you.
I need to get information about the option from the apex code. Tried to get PicklistEntry and check isActive flag:
Schema.DescribeFieldResult fieldResult = Vote.Type.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
for(Schema.PicklistEntry f : ple){
    system.debug(f);
}
User-added image
All picklist options are active. 
 
Hi

One profile does cannot convert Leads in UAT and Production. Is this an access issue on the profile or something on the Opportunity Triggers?

Sys Admin (me) can convert leads fine

error that the user recieves
"Error: There was an error converting the lead. Please resolve the following error and try again: OpportunityTriggers: execution of AfterInsert caused by: System.DmlException: Insert failed. 
First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: 0065D000002VBSk: [] Class.OLOpportunityTeamCreator.createOppTeamMemberForOL: 
line 50, column 1 Class.OpportunityAfterInsertTriggerHandler.mainEntry: line 18, column 1 Class.TriggerDispatcherBase.execute: line 117, 
column 1 Class.OpportunityTriggerDispatcher.afterInsert: 
line 63, column 1 Class.TriggerFactory.execute: line 51, column 1 Class.TriggerFactory.createTriggerDispatcher: line 21, column 1 Trigger.OpportunityTriggers: line 90, column 1

Error within the debug log
"16:50:35.208 (2588613820)|EXCEPTION_THROWN|[50]|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: 0065D000002VEvz: []
16:50:35.208 (2589179967)|HEAP_ALLOCATE|[50]|Bytes:174
16:50:35.208 (2589213069)|METHOD_EXIT|[18]|01p6F000006HWOz|OLOpportunityTeamCreator.createOppTeamMemberForOL(List<Opportunity>)
16:50:35.208 (2589228466)|METHOD_EXIT|[117]|01p6F000006SKst|OpportunityAfterInsertTriggerHandler.mainEntry(TriggerParameters)
16:50:35.208 (2589240942)|METHOD_EXIT|[63]|01p6F000006SKt2|TriggerDispatcherBase.execute(ITriggerHandler, TriggerParameters, TriggerParameters.TriggerEvent)
16:50:35.208 (2589250299)|METHOD_EXIT|[51]|01p6F000006SKsy|OpportunityTriggerDispatcher.afterInsert(TriggerParameters)
16:50:35.208 (2589265855)|METHOD_EXIT|[21]|01p6F000006SKt4|TriggerFactory.execute(ITriggerDispatcher)
16:50:35.208 (2589274199)|SYSTEM_MODE_EXIT|false
16:50:35.208 (2589287768)|METHOD_EXIT|[90]|01p6F000006SKt4|TriggerFactory.createTriggerDispatcher(Schema.SObjectType)
16:50:35.208 (2589388541)|FATAL_ERROR|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: 0065D000002VEvz: []"

I have looked at Triggers as listed in the debug log, but i am not sure exactly what i am looking for.  I don't see reference ot the profile anywhere
01p6F000006HWOz|OLOpportunityTeamCreator.createOppTeamMemberForOL(List<Opportunity>)
01p6F000006SKst|OpportunityAfterInsertTriggerHandler.mainEntry(TriggerParameters)
01p6F000006SKt2|TriggerDispatcherBase.execute(ITriggerHandler, TriggerParameters, TriggerParameters.TriggerEvent)
01p6F000006SKsy|OpportunityTriggerDispatcher.afterInsert(TriggerParameters)
01p6F000006SKt4|TriggerFactory.execute(ITriggerDispatcher)

i have debug logs for the profile that is failing 

i have debug logs for me that are allowing to convert the Lead.

what is the best way to figure out where i need to change the access?  The logs are long and this is my first time looking at debug logs. 

UAT refresh Dec 22nd - only change in environments

thank you
Cat




 
Hi All

Can anyone please help me understand how to retrieve all page layouts for an object using metadata api

In trail head i was able to find a snippet where you can retrieve one layout, but not all together. Was not able to figure out how to retrieve all-
//Method created to retrieve / query the page layouts of an object
    public static void queryPageLayouts() {
        
        // Retrieve Account layout and section 
        List<Metadata.Metadata> layouts = 
            Metadata.Operations.retrieve(Metadata.MetadataType.Layout, 
            new List<String> {'Account-Account (Marketing) Layout'});
        
        for(Metadata.Metadata layout : layouts) {
            System.debug('The layouts in Accounts are:'+ layout.fullname);        
        }
    }

The above helps me get one layout, if i were to retrieve all layouts, how should i write my code

Thanks,
Rajat
Hello, 

I have a formula that produces an outcome of either YES or NO. 

This formula will produce a NO if any of the selections are made. 

A YES would be produced if additional picklist items are selected (not shown). 

What i'm trying to do, is somehow make this formula shorter if possible? 

Would anyone know how to condense it? 

thanks!

 
IF(
OR(
AND(
NOT(ISPICKVAL([Account].productA, "")),
NOT(ISPICKVAL([Account].productA, "No Location"))
),
AND(
NOT(ISPICKVAL([Account].productAB, "")),
NOT(ISPICKVAL([Account].productAB, "No Location"))
),
AND(
NOT(ISPICKVAL([Account].productXY , "")),
NOT(ISPICKVAL([Account].productXY , "No Location"))
),
AND(
NOT(ISPICKVAL([Account].productEE, "")),
NOT(ISPICKVAL([Account].productEE, "No Location"))
)
), "Yes", "No")

 
  • January 10, 2018
  • Like
  • 0
This might be simple but I am unable to figure out what I am missing. I need to get Project Managers from the VF page and pass them in to my Query. Here is my Apex class and my VF page.
Class :
public class ProjectsFilterByDates{
public ProjectsFilterByDates(ApexPages.StandardController stdController) {
  }
  Date StartDate;
  Date EndDate;
  public String DateStringProperty{get;set;}  
  List<AcctSeed__Project__c> results;
  String[] ProjectManagers = new String[]{};
  public Date getstartDate(){
  return StartDate;
  }
  public Date getEndDate(){
  return EndDate;
  }
  Public List<AcctSeed__Project__c> getresults(){
  return results;
  }
  public void setStartDate(Date input){
  StartDate = input;
  }
  public void setEndDate(Date input1){
  EndDate = input1;
  }
  
     public List<SelectOption> getListOfUser(){
     List<User> Users = [select Name from user Where Project_Manager__c = true Order By Name ASC] ;
     List<SelectOption> options = new List<SelectOption>();
        for(User u : Users)
               {
                options.add(new SelectOption(u.Id , u.Name));
               }
                  return options;
                  }
  public String[] getProjectManagers (){
  return ProjectManagers;
  }
  public void setProjectManagers (string[] ProjectManagers){
  this.ProjectManagers = ProjectManagers;
  }   

  public PageReference Search(){
  results = [SELECT Name,UserID__c,AcctSeed__Account__r.Name,Date_Created__c,Construction_Manager__r.Name,AcctSeedERP__Manufactured_Product__r.Name,Project_Manager__c FROM AcctSeed__Project__c WHERE Date_Created__c >= :StartDate AND Date_Created__c <= :EndDate AND Project_Manager__c =:ProjectManagers order by Date_Created__c desc ];
  return null;
  }
}
VF Page:
<apex:page Standardcontroller="AcctSeed__Project__c" extensions="ProjectsFilterByDates" showHeader="false" sidebar="false" docType="html-5.0" language="en_Us" >
<apex:form >
<apex:pageBlock >
 Start Date: <apex:input type="date" value="{!StartDate}"/>
 End Date: <apex:input type="date" value="{!EndDate}"/>
<apex:selectList value="{!ProjectManagers}" size="5" multiselect="true">
<apex:selectOptions value="{!ListOfUser}"/>
</apex:selectList><p/>

<apex:commandButton value="Search For Projects" action="{!search}"/>
<apex:pageBlockTable value="{!results}" var="p">
<apex:column value="{!p.Name}"/>
<apex:column value="{!p.AcctSeed__Account__r.Name}"/>
<apex:column value="{!p.Project_Manager__c}"/>
<apex:column value="{!p.Date_Created__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
I've gone through every step successfully but am banging my head against the wall with step 8. I have more than adequate code coverage but continue to get this error message:
User-added image
I have gone back and rewritten OrderTests twice according to the requirements but can't get past this error. Anyone else had any luck with this?

Here's my code for reference:
@isTest (SeeAllData=false)
private class OrderTests {
    
    static void SetupTestData() {
	    TestDataFactory.InsertTestData(5);
    }
 
    @isTest static void OrderExtension_UnitTest() {
        PageReference pageRef = Page.OrderEdit;
        Test.setCurrentPage(pageRef);
        SetupTestData();
        ApexPages.StandardController stdcontroller = new ApexPages.StandardController(TestDataFactory.orders[0]);        
        OrderExtension ext = new OrderExtension(stdcontroller);        
       	System.assertEquals(Constants.DEFAULT_ROWS, ext.orderItemList.size());
        ext.OnFieldChange();
        ext.SelectFamily();
        ext.Save();
        ext.First();
        ext.Next();
        ext.Previous();
        ext.Last();
        ext.GetHasPrevious();
        ext.GetHasNext();
        ext.GetTotalPages();
        ext.GetPageNumber();
        List<SelectOption> options = ext.GetFamilyOptions();
    }
    
@isTest
public static void OrderUpdate_UnitTest(){
    setupTestData();
    
   
    Test.startTest();
    
    List<Order> orders = TestDataFactory.orders;
    for (Order o : orders){
        o.Status = Constants.ACTIVATED_ORDER_STATUS;
    }
    List<Product2> oldProducts = TestDataFactory.products;
    Set<Id> productIds = new Set<Id>();
    for (Product2 oldProd : oldProducts){
        productIds.add(oldProd.Id);
    }
    oldProducts = [SELECT Id, Quantity_Ordered__c FROM Product2 WHERE ID IN :productIds];
    Map<Id, Integer> quantities = new Map<Id, Integer>();
    for (OrderItem oi : TestDataFactory.orderItems){
        Integer quantity = 0;
        List<PricebookEntry> pricebookentries = TestDataFactory.pbes;
        for (PricebookEntry pbe : pricebookentries){
            if (oi.PricebookEntryId == pbe.Id){                
                if (quantities.containsKey(pbe.Product2Id)){
                    quantity = quantities.get(pbe.Product2Id);
                }
                quantity += (Integer)oi.Quantity;
                quantities.put(pbe.Product2Id, quantity);
                break;
            }
        }
    }
   
    update orders;
    Map<Id, Product2> currentProducts = new Map<Id, Product2>([Select Id, Quantity_Ordered__c FROM Product2 WHERE Id IN :productIds]);
  
    for (Product2 prod : oldProducts){
      
        TestDataFactory.VerifyQuantityOrdered(prod, currentProducts.get(prod.Id), quantities.get(prod.Id));
  }
  Test.stopTest();
}
}

 
In My Existing VF code I’ve related list "Notes&Attachments" tied to Account
  <apex:relatedList subject="{!account}" list="NotesAndAttachments"   />  

Now i want to replace with Files and Notes.
     <apex:relatedList subject="{!account}" list="AttachedContentDocuments"  />   
      <apex:relatedList subject="{!account}" list="AttachedContentNotes"  />

Issues is with Notes - I’ve to set the API version above 35 in order to identify AttachedContentNotes object. If i do that, I’ll lose access to existing Notes&Attachment on VF Page, since above 36 version are not supported to notes and attachment.

How can i display both Notes&Attachment and AttachedContentNotes ? or what will be an ideal solution, the reason i want Note&Attachments is it has all historical data and other integration ties

Please Suggest,
Thanks In Advance
  • October 27, 2016
  • Like
  • 1