• Dongzhi Yang 27
  • NEWBIE
  • 10 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 4
    Likes Given
  • 1
    Questions
  • 10
    Replies
Is there a way to see created by , last modified by in feild definition using tooling api, metadata api or other ways in Apex?screenshot from the field definition page for a custom field
Is there a way to see created by , last modified by in feild definition using tooling api, metadata api or other ways in Apex?screenshot from the field definition page for a custom field
I recently updated VS Code, but when I relauched it and tried to authorize an org I get an error saying the follwing:

Command 'SFDX: Authorize an Org' resulted in an error (command 'sfdx.force.auth.web.login' not found)

I believe I have the Salesforce CLI added to my path. If anyone is able to help I would greatly appreciate it. Thank you

Hi, do you know why there is no "Where is this used" for standard fields? How you can find where standard field is used? 

Thanks

  • March 23, 2020
  • Like
  • 0
what are the layout specific rules in order of execution?

 
Hi,
I'm in a terrible dilemma with the trigger. I was wondering why there is no id assigned on the record anymore
trigger trigger_Account on Account(before insert, before update){
  for( Account acc : Trigger.new){
    system.debug('Account id: ' + acc.id);
  }
}
this change affected some of my previous triggers
  • June 10, 2016
  • Like
  • 1
Hi,

When i insert 10 records if any of the record is not equal to Utility.AccountRecordType then i need to remove the record from the trigger.new list. 

for(integer i=0;i<Trigger.new.size();i++){
        if(Trigger.new[i].RecordTypeId != Utility.AccountRecordType){
            Trigger.new.remove(i);
        }
    }

Regards
Suresh S

Hey everyone,

 

I'm working on an application, and I got the OAuth2 workflow working right away, but I've been struggling with making requests afterward.

 

I get the access_token and instance_url back, and when I make a call like this:

 

 

curl -v https://__instance_id__ (na7).salesforce.com/services/data/v20.0/ -H "Authorization: OAuth access_token_from_earlier"

 

the server responds with a 401 with the following body:

[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

 

I've scoured the forum for solutions already, and made sure that I have API access turned on, signed up for the REST API through the developer preview form, but am still having errors all over the place.

 

Any help would be greatly appreciated.

 

Thanks!

Hello,
 
Does anybody knows how you can remove a record from trigger.new before the insert? I tried with

System.Trigger.new.remove(i);

But I get the followin error message:

 
19:00:04 INFO - <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="http://soap.sforce.com/2006/08/apex"><soapenv:Body><soapenv:Fault><faultcode>sf:UNKNOWN_EXCEPTION</faultcode><faultstring>UNKNOWN_EXCEPTION: An unexpected error occured. Please include this ErrorId if you contact support: 554952691-62</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
 
Thank you for your help
 
François de Bergeyck
Hi, 
There are almost 500 fields in Accounts and Iam trying to delete the fields of a couple of page layouts and fields not used in any page layout (and any custom logic). 
It is not practical to check each field if it is being used in any page layout. 
Using this tooling API SOQL
SELECT Layout.Name, Layout.TableEnumOrId FROM ProfileLayout WHERE Layout.TableEnumOrId = 'Account'
i was able to retrieve the page layout names. 
Is there any way for me to retrieve the fields of these page layouts. 

I have built a vf page and a controller from here:
https://developer.salesforce.com/forums/?id=906F0000000DD9aIAG

but i get 'Collection size exceeds maximum size of 1000 error'. 

and our org dont use LWC so is there any other not so complicated approach for this issue.

Thanks for your time.

May the Force be with you!!!!!!!!!!!!! 
 
Has anyone worked on an Batch Class which converts leads. If yes please send me sample code
  • March 24, 2021
  • Like
  • 1
Hi,
I'm in a terrible dilemma with the trigger. I was wondering why there is no id assigned on the record anymore
trigger trigger_Account on Account(before insert, before update){
  for( Account acc : Trigger.new){
    system.debug('Account id: ' + acc.id);
  }
}
this change affected some of my previous triggers
  • June 10, 2016
  • Like
  • 1
Hi,

When i insert 10 records if any of the record is not equal to Utility.AccountRecordType then i need to remove the record from the trigger.new list. 

for(integer i=0;i<Trigger.new.size();i++){
        if(Trigger.new[i].RecordTypeId != Utility.AccountRecordType){
            Trigger.new.remove(i);
        }
    }

Regards
Suresh S