• S N 27
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 1
    Replies
Hi All,
I am creating a flow wherein I am fetching the related records. Suppose I have a custom Object Services for which the values are populated using Dynamic Record Choice in the form of Multiselect Checkbox. (Please find attached screen)
User-added image
When I select one of the values, the related records to that should populate on the next screen. This happens correctly if I select one of the above two values.
User-added image
However, the issue arises when I select both. Then the related records are not fetched and the next screen appears blank. I have made use of the Flow lookup and then I am collecting it in a SObject collection variable and iterating over it. But that doesn't solve the purpose. Any inputs will be highly appreciated.
Hi All, 
I have a requirement wherein a table has to be designed(attached wireframe). The top 4 rows has to be static with the various roles pre-populated. 
Wireframe for Roles
The table is kind of static with individual div's. The problem is I have a copy button on the left that when clicked will show a popup and allow the user to copy the field values. Eg: I click on copy besides billing customer , I have an option to copy from the above 2 rows. Currently I have made use of action support and written an apex method which does the copy. But this is eats up lots of lines of code. I want to simplify the copy process. Any help will be highly appreciated.
Sample copy method is:
public String copyRoleData(){
        system.debug('copyRoleData>>>>>called>>>>>>>');
        for(CopyApplicationRoleWrapper wrapp : copywrappers){
            system.debug('wrapp.copyselectedValue>>>>>>>>>>>'+wrapp.copyselectedValue);
            if(System.label.APPLICATIONROLE_Developer.equals(wrapp.copyselectedValue)){
              system.debug('I am the developer>>>>>>>>>>');
              system.debug('approleDevRec.First_Name__c>>>>>>>>>>>'+approleDevRec.First_Name__c);
              approleBillRec.First_Name__c = approleDevRec.First_Name__c;
              approleBillRec.Last_Name__c = approleDevRec.Last_Name__c;
              approleBillRec.Company_Name__c = approleDevRec.Company_Name__c;
              approleBillRec.Email__c = approleDevRec.Email__c;
              approleBillRec.Access_Type__c = approleDevRec.Access_Type__c;
              approleBillRec.Phone_Number__c = approleDevRec.Phone_Number__c;
              approleBillRec.Active__c = approleDevRec.Active__c;
              approleBillRec.Billing_City__c = approleDevRec.Billing_City__c;
              approleBillRec.Billing_Street__c = approleDevRec.Billing_Street__c;
              approleBillRec.Billing_State__c = approleDevRec.Billing_State__c;
              approleBillRec.Billing_Zip_Postal_Code__c = approleDevRec.Billing_Zip_Postal_Code__c;
              approleBillRec.Mailing_City__c = approleDevRec.Mailing_City__c;
              approleBillRec.Mailing_Street__c = approleDevRec.Mailing_Street__c;
              approleBillRec.Mailing_State__c = approleDevRec.Mailing_State__c;
              approleBillRec.Mailing_Zip_Postal_Code__c = approleDevRec.Mailing_Zip_Postal_Code__c;

            }
            if(System.label.APPLICATIONROLE_Application_Owner.equals(wrapp.copyselectedValue)){
              system.debug('I am the Application Owner>>>>>>>>>>');
              system.debug('approleDevRec.First_Name__c>>>>>>>>>>>'+approleAppOwnerRec.First_Name__c);
              approleBillRec.First_Name__c = approleAppOwnerRec.First_Name__c;
              approleBillRec.Last_Name__c = approleAppOwnerRec.Last_Name__c;
              approleBillRec.Company_Name__c = approleAppOwnerRec.Company_Name__c;
              approleBillRec.Email__c = approleAppOwnerRec.Email__c;
              approleBillRec.Access_Type__c = approleAppOwnerRec.Access_Type__c;
              approleBillRec.Phone_Number__c = approleAppOwnerRec.Phone_Number__c;
              approleBillRec.Active__c = approleAppOwnerRec.Active__c;
              approleBillRec.Billing_City__c = approleAppOwnerRec.Billing_City__c;
              approleBillRec.Billing_Street__c = approleAppOwnerRec.Billing_Street__c;
              approleBillRec.Billing_State__c = approleAppOwnerRec.Billing_State__c;
              approleBillRec.Billing_Zip_Postal_Code__c = approleAppOwnerRec.Billing_Zip_Postal_Code__c;
              approleBillRec.Mailing_City__c = approleAppOwnerRec.Mailing_City__c;
              approleBillRec.Mailing_Street__c = approleAppOwnerRec.Mailing_Street__c;
              approleBillRec.Mailing_State__c = approleAppOwnerRec.Mailing_State__c;
              approleBillRec.Mailing_Zip_Postal_Code__c = approleAppOwnerRec.Mailing_Zip_Postal_Code__c;
              
            }
        }
        return null;
    }
 
Hi All, 
I have a requirement where on Case creation I am populating the Start Date and there is another field named "Days Allowed" that is initially set to 1.
I want this Days Allowed to keep incrementing every day to +1. Can I do it with workflow time trigger. I tried the approach wherein I set the condition to Trigger to Fire 1 day after the start date. I know this would just fire for the first day after the start date. I have also set another condition to fire "1 Day After Rule Trigger Date". Will this trigger run daily?? 
Please suggest the best possible option. Thanks in advance
  • November 22, 2016
  • Like
  • 0
Hi All,
I have written a small piece of code that basically checks for the asset related to Case. If the case status is updated to "Application-submitted" and if there are no asset related to a case then throw an error. I have made use of Aggregate result to count the asset on the case.I don't know where my code is going wrong.pls help

trigger assetCountonCase on Case (before update) {

    Set<Id> caseId = new Set<Id>();
    Set<Id> rtIds = new Set<Id>();
    
    Map<ID,RecordType> casertMap = New Map<ID,RecordType>([Select ID,Name,DeveloperName From RecordType Where sObjectType ='Case']);
    system.debug('casertMap=========================='+casertMap);
    for(Case cse: Trigger.new){
        system.debug('cse==========================');
        if((cse.status=='Application-Submitted')&&((casertMap.get(cse.recordTypeID).Developername.containsIgnoreCase('Simple_Application'))||(casertMap.get(cse.recordTypeID).Developername.containsIgnoreCase('Complex_Application')))){
            caseId.add(cse.Id);
            system.debug('caseId========================'+caseId);
        }
    }
    
    Map<Id,AggregateResult> assetConMap = new Map<Id,AggregateResult>([Select JMB1__Case__c id,count(id) a from Asset where JMB1__Case__c!=null and JMB1__Case__c in:caseId GROUP BY JMB1__Case__c]);
    system.debug('assetConMap========================='+assetConMap);
    
    for(Case cse: Trigger.new){
        AggregateResult assetsize = assetConMap.get(cse.Id);
        system.debug('assetsize==========================='+assetsize);
        if(assetsize==null){
            cse.addError('One asset is required');
        }
    
    }

}
  • October 16, 2016
  • Like
  • 0
Hi All, I have a multi-select picklist that has 52 values in it. The requirement is to populate the selected values to another long text field. The original multi-select field is labeled "AMP". I have created a long text and updating the values using a workflow field update.Following is the formula I have used.

IF(INCLUDES(AMP__c,'Blue Card PPO'), 'Blue Card PPO'+ '; ',NULL)&
IF(INCLUDES(AMP__c,'Blue Choice PPO'), 'Blue Choice PPO'+ "; ",NULL)&
IF(INCLUDES(AMP__c,'Blue View Vision Only'),'Blue View Vision Only'+ "; ",NULL)&
IF(INCLUDES(AMP__c,'Comprecare'), 'Comprecare'+ "; ",NULL)&
IF(INCLUDES(AMP__c,'Direct HMO'), 'Direct HMO'+ "; ",NULL)&
IF(INCLUDES(AMP__c,'Direct POS'), 'Direct POS'+ "; ",NULL)

Likewise I have many more in the list. The problem is whenever I try saving this it gives me an error on the Byte size. It should not exceed 4000bytes. I have managed it to cut it down to 4600bytes. Please help me out on this.
 
  • August 18, 2016
  • Like
  • 0
Hi All,
I have a requirement, wherein my client needs the ability to add more than 50 contacts to an event. Any help would be highly appreciated.
Hi All,
I am the owner of a sandbox. I just wanted to know, will I get any kind of notification that the project has been donwloaded through eclipse?
  • February 27, 2016
  • Like
  • 0
Hi All,
I have an Object called Account_Contact__c that has a field in masterdetail to account named Accounts__c.I am trying to access the Account's owner id in the for loop.
for(Account_Contact__c acn : MyList){

I have a set here that checks for all the account owners.
MySet.contains(acn.Account__r.OwnerId);
}

Is this the correct approach. There is no error while saving the code. But on the UI iam getting the error,"soql retrieved without querying the requested field".

Any help would be highly appreciated.
  • February 19, 2016
  • Like
  • 0
Hi All,
I have a requirement wherein I am required to have two separate links in a single chatter feed. I was able to successfully fit in a single link with the below code, but having more than one link seems to be a challenging task.
Please help me out accomodating multiple links. Thanks in advance.

This is a piece of code:


feedItemInput.body = messageBodyInput;              
                feedItemInput.feedElementType = ConnectApi.FeedElementType.FeedItem;
                feedItemInput.subjectId = e.id;
               
               
                // add the attachment
                //ConnectApi.LinkAttachmentInput linkIn = new ConnectApi.LinkAttachmentInput();
                ConnectApi.LinkCapabilityInput linkIn = new ConnectApi.LinkCapabilityInput();
                linkIn.urlName = 'Mobile users click on the below link';              
                linkIn.url = URL.getSalesforceBaseUrl().toExternalForm()+'/apex/MyNotes?id='+e.id;
               //linkIn.urlName = 'Desktop users click on the below link';              
                //linkIn.url = URL.getSalesforceBaseUrl().toExternalForm()+'/'+e.id;
                feedElementCapabilitiesInput.link = linkIn;              
                feedItemInput.capabilities = feedElementCapabilitiesInput;
                feedItemInput.feedElementType = ConnectApi.FeedElementType.FeedItem;
                ConnectApi.FeedElement feedElement = ConnectApi.ChatterFeeds.postFeedElement(null,feedItemInput,null);
​​​
  • January 26, 2016
  • Like
  • 0
Hi All, 
I have a requirement wherein a table has to be designed(attached wireframe). The top 4 rows has to be static with the various roles pre-populated. 
Wireframe for Roles
The table is kind of static with individual div's. The problem is I have a copy button on the left that when clicked will show a popup and allow the user to copy the field values. Eg: I click on copy besides billing customer , I have an option to copy from the above 2 rows. Currently I have made use of action support and written an apex method which does the copy. But this is eats up lots of lines of code. I want to simplify the copy process. Any help will be highly appreciated.
Sample copy method is:
public String copyRoleData(){
        system.debug('copyRoleData>>>>>called>>>>>>>');
        for(CopyApplicationRoleWrapper wrapp : copywrappers){
            system.debug('wrapp.copyselectedValue>>>>>>>>>>>'+wrapp.copyselectedValue);
            if(System.label.APPLICATIONROLE_Developer.equals(wrapp.copyselectedValue)){
              system.debug('I am the developer>>>>>>>>>>');
              system.debug('approleDevRec.First_Name__c>>>>>>>>>>>'+approleDevRec.First_Name__c);
              approleBillRec.First_Name__c = approleDevRec.First_Name__c;
              approleBillRec.Last_Name__c = approleDevRec.Last_Name__c;
              approleBillRec.Company_Name__c = approleDevRec.Company_Name__c;
              approleBillRec.Email__c = approleDevRec.Email__c;
              approleBillRec.Access_Type__c = approleDevRec.Access_Type__c;
              approleBillRec.Phone_Number__c = approleDevRec.Phone_Number__c;
              approleBillRec.Active__c = approleDevRec.Active__c;
              approleBillRec.Billing_City__c = approleDevRec.Billing_City__c;
              approleBillRec.Billing_Street__c = approleDevRec.Billing_Street__c;
              approleBillRec.Billing_State__c = approleDevRec.Billing_State__c;
              approleBillRec.Billing_Zip_Postal_Code__c = approleDevRec.Billing_Zip_Postal_Code__c;
              approleBillRec.Mailing_City__c = approleDevRec.Mailing_City__c;
              approleBillRec.Mailing_Street__c = approleDevRec.Mailing_Street__c;
              approleBillRec.Mailing_State__c = approleDevRec.Mailing_State__c;
              approleBillRec.Mailing_Zip_Postal_Code__c = approleDevRec.Mailing_Zip_Postal_Code__c;

            }
            if(System.label.APPLICATIONROLE_Application_Owner.equals(wrapp.copyselectedValue)){
              system.debug('I am the Application Owner>>>>>>>>>>');
              system.debug('approleDevRec.First_Name__c>>>>>>>>>>>'+approleAppOwnerRec.First_Name__c);
              approleBillRec.First_Name__c = approleAppOwnerRec.First_Name__c;
              approleBillRec.Last_Name__c = approleAppOwnerRec.Last_Name__c;
              approleBillRec.Company_Name__c = approleAppOwnerRec.Company_Name__c;
              approleBillRec.Email__c = approleAppOwnerRec.Email__c;
              approleBillRec.Access_Type__c = approleAppOwnerRec.Access_Type__c;
              approleBillRec.Phone_Number__c = approleAppOwnerRec.Phone_Number__c;
              approleBillRec.Active__c = approleAppOwnerRec.Active__c;
              approleBillRec.Billing_City__c = approleAppOwnerRec.Billing_City__c;
              approleBillRec.Billing_Street__c = approleAppOwnerRec.Billing_Street__c;
              approleBillRec.Billing_State__c = approleAppOwnerRec.Billing_State__c;
              approleBillRec.Billing_Zip_Postal_Code__c = approleAppOwnerRec.Billing_Zip_Postal_Code__c;
              approleBillRec.Mailing_City__c = approleAppOwnerRec.Mailing_City__c;
              approleBillRec.Mailing_Street__c = approleAppOwnerRec.Mailing_Street__c;
              approleBillRec.Mailing_State__c = approleAppOwnerRec.Mailing_State__c;
              approleBillRec.Mailing_Zip_Postal_Code__c = approleAppOwnerRec.Mailing_Zip_Postal_Code__c;
              
            }
        }
        return null;
    }