• DEV_CG
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 14
    Replies
Hi Team,
ParentA is primary Parent A and ParentB is secondary Parent on Junction object .

1) OWD on ParentB is Private,
OWD on ParentA is Pubblic read only,
Now what is the OWD on Junction object ?
2) OWD on ParentA is Public ReadOnly
 OWD on ParentB is public-read/write
OWD of Junction object ?
(Note User has Read,Edit access on ParentB and Read access on ParentA)


Could any please describe how can we determine this ?
 
  • March 03, 2020
  • Like
  • 0
Hi everyone,
I want to clone the Accounts and respective ccontacts through trigger without using existing methods in salesforce.
could anyone please suggest?
 
  • December 29, 2018
  • Like
  • 0
hi everyone,
 I would like to get the filed values of that we queried...below i would get the schema.sobjectfileds...
i have related object fileds in my query like account.name,account.type,account.industroy ,name,id from contact.
I would like store only above files and i wold like get the vaues respectively using schema.SobjectField 

private void discoverAccessibleFields(sObject newObj) {
32        list< Schema.SobjectField> accessibleScheama = new List< Schema.SobjectField>();
33        Map<String, Schema.SobjectField> fields =
34            newObj.getSObjectType().getDescribe().fields.getMap();
35        for ( Schema.SobjectField s : fields.values()) {
36            accessibleScheama .add(a)
38            }
39        }
40    }
  • November 19, 2018
  • Like
  • 0
 i used below query in start method
select id,firstname,account.name,account.type ,accountd from contact
but i when i debugged the Scope records, am able to see  only id,firstname,accoundid data,
it is saying account.name is invalid filed...

any suggess please
  • November 19, 2018
  • Like
  • 0
Select id, firstname, account.name, account.type from contact
i passed this query into start method, when I checked scope list of execute method I couldn't see any files related to account ..how to fetch them
  • November 18, 2018
  • Like
  • 0
When tried from query editor able to fetch the records..
but when I sent  below query as dynamic query into start method of batch, and when i debug the records of Scope..not able to fetch the Account details ..only id,reason filed values able to fetch... how to fetch related object values dynamically when i pass this query into start mehtod
select id,account.name,account.id ,reason from case
  • November 18, 2018
  • Like
  • 0
scope is list of records from start method of batch which are passed to execute method.

for(SObject obj : scope)
         {
            String fieldValue='';
                for(String fieldName : queryFields)
                {   
                 fieldValue = fieldValue +','+ obj.get(fieldName);
                }
          }
does it work if we sue obj.fieldName
 
  • November 18, 2018
  • Like
  • 0
Hi everyone, 
could you please help me in this

When I queried using Query editor, am able to fetch the records from case history. but
when I write in apex class as dynamic query using case history, am getting below error
12:43:35:070 USER_DEBUG [64]|DEBUG|The following exception has occurred: Invalid field case.status for CaseHistory
  • November 18, 2018
  • Like
  • 0
List<Sobject> sObj = Database.Query('select id from Account');
system.debug(sObj.get('Name'));
i referred this link :https://developer.salesforce.com/forums/?id=906F00000008qYUIAY

am unable to fetch the name of sObject...and am getting below error
Method does not exist or incorrect signature: void get(String) from the type List<SObject>

 ireferred the one of the link of our forum,but its not working for me...could anyone help me
please refer below link 

 
  • November 17, 2018
  • Like
  • 0
Hi everyone,

could you please check and help me out
List<case> scope=new List<Case>([select id from case]);
Schema.SObjectType sObjectType = scope.getSObjectType();
String s=(string)sObjectType;
its not working
  • November 17, 2018
  • Like
  • 0
Hi everyone,
global void execute(Batchablecontext bc, List<Sobject> Scope)
{

}
// now  i would like to fetch the Filed names of Scope, and i want to put them in to string list.

could anyone help me in this.
  • November 17, 2018
  • Like
  • 0
hi everyone,
kindly see code provided in this link.
https://developer.salesforce.com/forums/?id=9060G0000005sp4QAA

In this what would the value of Query?
what would be value of records in Scope?
Actully am querying from different objects...which will take fisrt if both queries fetched the records.
could anyone explain?
your help would be appreciated
  • November 17, 2018
  • Like
  • 0
how to know which line of code we stopped and how to set debug points and logs 
  • November 17, 2018
  • Like
  • 0
select id,name,email from Account where createddate=today
select accountid,Account.name from Contact where account.closeddate=today and createdate=today
  • November 17, 2018
  • Like
  • 0
what exactly it means..when ever i quered 
SELECT Id, MasterLabel
 FROM LeadStatus WHERE IsConverted=true,
result is only one record:

SELECT Id, MasterLabel
 FROM LeadStatus WHERE IsConverted=false:
result is 3 records:

is it like only 4 master lables we have in leadstatus
  • November 15, 2018
  • Like
  • 0
Hi Team,
ParentA is primary Parent A and ParentB is secondary Parent on Junction object .

1) OWD on ParentB is Private,
OWD on ParentA is Pubblic read only,
Now what is the OWD on Junction object ?
2) OWD on ParentA is Public ReadOnly
 OWD on ParentB is public-read/write
OWD of Junction object ?
(Note User has Read,Edit access on ParentB and Read access on ParentA)


Could any please describe how can we determine this ?
 
  • March 03, 2020
  • Like
  • 0
 i used below query in start method
select id,firstname,account.name,account.type ,accountd from contact
but i when i debugged the Scope records, am able to see  only id,firstname,accoundid data,
it is saying account.name is invalid filed...

any suggess please
  • November 19, 2018
  • Like
  • 0
Select id, firstname, account.name, account.type from contact
i passed this query into start method, when I checked scope list of execute method I couldn't see any files related to account ..how to fetch them
  • November 18, 2018
  • Like
  • 0
scope is list of records from start method of batch which are passed to execute method.

for(SObject obj : scope)
         {
            String fieldValue='';
                for(String fieldName : queryFields)
                {   
                 fieldValue = fieldValue +','+ obj.get(fieldName);
                }
          }
does it work if we sue obj.fieldName
 
  • November 18, 2018
  • Like
  • 0
Hi everyone, 
could you please help me in this

When I queried using Query editor, am able to fetch the records from case history. but
when I write in apex class as dynamic query using case history, am getting below error
12:43:35:070 USER_DEBUG [64]|DEBUG|The following exception has occurred: Invalid field case.status for CaseHistory
  • November 18, 2018
  • Like
  • 0
select id,name,email from Account where createddate=today
select accountid,Account.name from Contact where account.closeddate=today and createdate=today
  • November 17, 2018
  • Like
  • 0

 

 Looking for a workaround to fetch name from sObject record like I have 

List<Sobject> sObj = Database.Query(dynamicQuery) ;
for(SObject obj : sObj)
{
      //I can do this
      System.debug(' :::::::: ' + obj.Id) ;
     // Looking to do this
     System.debug('::::::::::::: ' + obj.Name) ;
}

 

I know the SObject name lets say account but I do not want to type cast mt result like this

List<Sobject> sObj = Database.Query(dynamicQuery) ;
for(SObject obj : sObj)
{
     Account acc = (Account)obj ;
}

 

Any help regarding this would be appreciable

Thanks
Ankit Arora