• Nithya S 1
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 40
    Replies
Hi all,
Below is the response I receive. How can I get the value of Field__c?
Response:{"Account":"{\"attributes\":{\"type\":\"Account\",\"url\":\"/services/data/v47.0/sobjects/Account/0014T000005aUCBQA2\"},\"Field__c\":\"0010I00002L0OtaQAF\",\"Id\":\"0014T000005aUCBQA2\"}"}

When I hardcode the response as a string, then I can navigate to Field__c. But how do I convert this response body to a string in the format as String myJson = '{"Account":{"attributes":{"type":"Account","url":"/services/data/v47.0/sobjects/Account/0014T000005aRZAQA2"},"Field__c":"0010I00002KzV6mQAF","Id":"0014T000005aRZAQA2"}}';
Hi, I am.trying to filter on records with a null record type in procrss builder using a formula - (OR[Contact].RecordType.Id =<18 digit I'd>, ISBLANK([Contact].Record type.Id)) and it gives an error when the action is executed. How can we filter on a null record type using the formula?
I've also tried using the recordtypename. That didn't work too.
Hi, I'm trying to fetch picklist from a custom object but the value isn't being displayed. Get a blank dropdown. Please let me know what is missing..

Snippet Component :
 <aura:attribute name="Location" type="Loc__c" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
     <lightning:select name="Location" aura:id="Location">
                            <aura:iteration items="{!v.Location}" var="loc">
                            <option value="{!v.loc.Loc__c}">
                            </option>
                    </aura:iteration>

Controller :
({
    doInit: function(component,event,helper){
     var action = component.get("c.getLocation");
        action.setCallback(this, function(a){
            component.set("v.Location",a.getReturnValue());
                  
        });
        $A.enqueueAction(action)
    },

Class:
 public class LocSearchController {
            @AuraEnabled
                public static List<Location__c> getLocation(){
                    return [select Loc__c from Location__c];
                    
                 }
}
Hi,
When creating a new user, the moment the email field is filled in, the username field is automatically populated with the email. Is this a standard functionality? And if so, how is this achieved?

Thanks!

Hello,
I am trying to upsert an contact based on a external ID field (x) and that should update/insert another external ID field (y).
So, the upsert inserts the contact based on x. But does not insert the value in the file to the field y, for a new contact.
When I tracked history for the field, y- it reads "deleted <value> from y"

Wouldn't it create the contact with the value?

Regards
Nits

Hello,
Below is the snippet from the response that we receive to update/upsert a contact value from another system. Get a foreign key error on the account entity. The value is present on the account object (queried to find).

<tns:externalIDFieldName>Number__c</tns:externalIDFieldName>
            <tns:sObjects>
               <ens:type xmlns:ens="urn:sobject.partner.soap.sforce.com">Contact</ens:type>
               <ens:SId__c xmlns:ens="urn:sobject.partner.soap.sforce.com">12345678</ens:SId__c>
               <ens:Number__c xmlns:ens="urn:sobject.partner.soap.sforce.com">12329065</ens:Number__c>
               <ens:StreetAddress__c xmlns:ens="urn:sobject.partner.soap.sforce.com">47 GEORGE STREET</ens:StreetAddress__c>
               <ens:StreetAddress2__c xmlns:ens="urn:sobject.partner.soap.sforce.com"/>
               <ens:StreetAddress3__c xmlns:ens="urn:sobject.partner.soap.sforce.com"/>
               <ens:Account xmlns:ens="urn:sobject.partner.soap.sforce.com">
                  <ens:type>Account</ens:type>
                  <ens:AccId__c>12344445</ens:AccId__c>
               </ens:Account>
            </tns:sObjects>
 
<message>Foreign key external ID: 12344445 not found for field AccId__c in entity Account</message>
                  <statusCode>INVALID_FIELD</statusCode>

Please assist.

Thanks!
Hi all,
We have lead inserts being done using data import wizard and we choose the lead assignment rule that needs to be assigned.
This is inturn updating the owner on the lead and calling ALL workflows (even though they do not meet the criteria) under lead object which is causing a limit exception - time out.

Is there a way out for this?

Regards
Nitty
Hi all,
There is a trigger on the lead that is cauing a APEX CPU time out which we found was due to the recursion. Added the code to ensure that recursion doesn't occur, but that is now causing a code coverage error when deploying to production.
 
Setting the value to "false" before the insert in the test class is resulting in more than 80% coverage in sandbox (when the test class is run individually). But when the validation occurs in production, it causes a code coverage error.

Please assist.


Trigger
trigger UpdateNewOpportunity on Lead (After Update, before Insert, before update) {
 if(!Acc_RecursionCheck.LeadRecursion){
 Acc_RecursionCheck.LeadRecursion = true;
    if(trigger.Isupdate && trigger.IsAfter){
        Map<ID,Lead> leadMap = new Map<Id, Lead>();
....
....


Test Class:
private class ClassForLeadtest {
        static testMethod void UpdateNewOpportunityTest() {
        
        try
        {
        system.test.startTest();
        List<Lead> leadList = new List<Lead>();
        Lead leadObj = new Lead( FirstName = 'Test1', LastName = 'Lead', Phone = '1234567890', Email = 'test1@lead.com', Company = 'Test Company'');
          Acc_RecursionCheck.LeadRecursion = false;
          insert leadObj;
          ...
          ...
          ..
          }
          }
Hey all,
I am using the standard approval process when a record is submitted. I wanted to know if there is a way to notify all approvers of different approval steps at the same time.
So let's say I have 5 approval steps. On the record, I choose a value in the field that triggers approval processes for steps 2 and 3. At the moment, the request is sent to the approver 2. Once approver 2 approves, it will move to approver 3. I would want both the approvers to be notified at the same time. Is there a way to do that?

Thanks!
Hi all,
I have a VF page with a save button using only the standard controller. When the save button is clicked, the entire page was being loaded in the VF section. 
So, I tried using the commandlink with the target_parent like -
<apex:commandLink value="Save" action="{!save}" target="_parent" styleClass="btn">
This worked fine in Chrome and Firefox but didn't work in IE despite checking all settings on IE. It opened a new window in IE with just the VF page.

So, I modified this to a command button using code similar to -
http://stackoverflow.com/questions/11552514/visualforce-page-embedded-in-a-detail-page-that-needs-to-redirect-to-other-page

But this doesn't work in IE. The record is not being saved at all.
Need help!

 
Hi all,
I have a VF page with a save button using only the standard controller. When the save button is clicked, the entire page was being loaded in the VF section. 
So, I tried using the commandlink with the target_parent like -
<apex:commandLink value="Save" action="{!save}" target="_parent" styleClass="btn">
This worked fine in Chrome and Firefox but didn't work in IE despite checking all settings on IE. It opened a new window in IE with just the VF page.

So, I modified this to a command button like -
<apex:commandButton value="Save" action="{!save}" onclick="window.top.location='/{!<object>.id}'; return true"/>
But this doesn't save the record at all times. The behavior is erratic. At times, it does save the record and at times it doesn't. This behavior is noted on all browsers.

Please assist.

 
Hi all,
We have an embedded VF page where in users fill out a few fields and click on the save button. In IE, the moment the save button is clicked, the window opens with just the VF page instead of showing up the entire page i.e standard and the VF page. We are using only the standard controller.
Here is the code used for the save button is -
<apex:commandLink value="Save" action="{!save}" target="_parent" styleClass="btn">

This works ok in Chrome, Firefox. But is not retaining the "parent" in IE.

Please assist.

Thanks!
Hi all,
I have a VF page with a save button using only the standard controller. When the save button is clicked, the entire page was being loaded in the VF section. 
So, I tried using the commandlink with the target_parent like -
<apex:commandLink value="Save" action="{!save}" target="_parent" styleClass="btn">
This worked fine in Chrome and Firefox but didn't work in IE despite checking all settings on IE. It opened a new window in IE with just the VF page.

So, I modified this to a command button like -
<apex:commandButton value="Save" action="{!save}" onclick="window.top.location='/{!<object>.id}'; return true"/>
But this doesn't save the record at all times. The behavior is erratic. At times, it does save the record and at times it doesn't. This behavior is noted on all browsers.

Please assist.

 
Hi all,
Below is the response I receive. How can I get the value of Field__c?
Response:{"Account":"{\"attributes\":{\"type\":\"Account\",\"url\":\"/services/data/v47.0/sobjects/Account/0014T000005aUCBQA2\"},\"Field__c\":\"0010I00002L0OtaQAF\",\"Id\":\"0014T000005aUCBQA2\"}"}

When I hardcode the response as a string, then I can navigate to Field__c. But how do I convert this response body to a string in the format as String myJson = '{"Account":{"attributes":{"type":"Account","url":"/services/data/v47.0/sobjects/Account/0014T000005aRZAQA2"},"Field__c":"0010I00002KzV6mQAF","Id":"0014T000005aRZAQA2"}}';
Hi, I am.trying to filter on records with a null record type in procrss builder using a formula - (OR[Contact].RecordType.Id =<18 digit I'd>, ISBLANK([Contact].Record type.Id)) and it gives an error when the action is executed. How can we filter on a null record type using the formula?
I've also tried using the recordtypename. That didn't work too.
Hi, I'm trying to fetch picklist from a custom object but the value isn't being displayed. Get a blank dropdown. Please let me know what is missing..

Snippet Component :
 <aura:attribute name="Location" type="Loc__c" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
     <lightning:select name="Location" aura:id="Location">
                            <aura:iteration items="{!v.Location}" var="loc">
                            <option value="{!v.loc.Loc__c}">
                            </option>
                    </aura:iteration>

Controller :
({
    doInit: function(component,event,helper){
     var action = component.get("c.getLocation");
        action.setCallback(this, function(a){
            component.set("v.Location",a.getReturnValue());
                  
        });
        $A.enqueueAction(action)
    },

Class:
 public class LocSearchController {
            @AuraEnabled
                public static List<Location__c> getLocation(){
                    return [select Loc__c from Location__c];
                    
                 }
}
Hi,
When creating a new user, the moment the email field is filled in, the username field is automatically populated with the email. Is this a standard functionality? And if so, how is this achieved?

Thanks!

Hello,
I am trying to upsert an contact based on a external ID field (x) and that should update/insert another external ID field (y).
So, the upsert inserts the contact based on x. But does not insert the value in the file to the field y, for a new contact.
When I tracked history for the field, y- it reads "deleted <value> from y"

Wouldn't it create the contact with the value?

Regards
Nits

Assignment Rule for New Leads for Existing Accounts. How?

Hello,

I would like to write either a lead assignment rule, workflow rule or Apex Trigger to accomplish this.

We would like our lead assignment, trigger and/or workflow rules to check if the lead's COMPANY already exists as an ACCOUNT, and therefore assign the new lead to the proper ACCOUNT OWNER.

Is there a formula that anyone can provide me to make this happen?

It would be great if the formula would look for CONTAINS "ACCOUNT NAME" rather than a direct match, for cases where a new lead submits their company name in a format slightly different than our existing ACCOUNT NAME.

Thank you greatly for your help.