Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The tag has no usage guidance.

0
votes
3answers
37 views

Retrieve object type via id using apex

I am new to Salesforce and trying to figure out the object type using the ID which I see in the URL on the Salesforce page. I found many places describing how to do this with the Apex language, such ...
1
vote
1answer
59 views

Find out org id

What are the ways to find out my org id? Here is a way I found. Log In to the Salesforce Help and Training Portal. Scroll to the Support & Services tile and view your Organization ID. ...
0
votes
1answer
70 views

how to get id from url in lightning component?

Hello! I just want to get an Id through a current page URL in lightning component... How to get this id from the component side? should this work on Aapexpages.currentPage().getParameters().get('Id')...
0
votes
2answers
72 views

How to convert a 15 char Id in Lightning ($SObjectType.CurrentUser.Id)

I'm using $SObjectType.CurrentUser.Id to find out if the current User is the owner of the current record. The issue here is that the method is providing a 15 char user Id. <aura:if isTrue="{!v....
1
vote
2answers
26 views

Test & datas - An issue with IDs

I'm working with class tests, I'm trying to use best practises so I got : - one class I want to test - one class for testing I got a problem when inserting my datas : @testSetup creates Accounts, and ...
1
vote
2answers
48 views

How to find id of lightning component tag which defined in iteration?

<aura:iteration items="{!v.List}" var="item" indexVar="i"> <div id="{!v.globalId + '_option'}" data-index="{!i}" data-id="{!item.Id}" onclick="{!c.jsFunction}"><text-...
2
votes
2answers
158 views

Delete an SObject by knowing only Id

Is it possible to delete an SObject by knowing only Id? Here is what I found: Id del = '003S00000099999'; // whatever ID you are deleting Contact ct = new Contact(Id = del); delete ct; So, is it ...
1
vote
1answer
34 views

Unable to pass Master-detail id while creating multiple records using ng-repeat

I have a use case where I have to display some fields on visualforce page and then whatever data user provides on the page, grab the data and create a record out if it. Now the record needs to be ...
0
votes
1answer
50 views

How to link a new record (Individual) as a parent with an object (Contact), using Process Builder?

I need to use the process builder in order, when a Contact is modified, to create a new record (of an Individual object) ; Then, this Individual as to be linked as a parent object to the Contact. Is ...
0
votes
0answers
85 views

Retrieve email ID pardot

I want to retieve the id of an email within the HTML but I don't manage to reach the email ID : I tried several expressions like : %%_emailid%%, %%id%%, %%email_id%% but nothing works. Do you have ...
0
votes
1answer
17 views

Text formula field does not shows the full id of an custom object

I have a formula field called CandidateKey__c which can hold either an opportunity or account id. I have noticed that the CandidateKey__c is not showing the full Id of opportunity or Account objects. ...
0
votes
1answer
49 views

Update Statement fails in test class when run as a community user

I am writing test case to check withdraw application function. It gives the following error on update application statement. System.DmlException: Update failed. First exception on row 0 with id ...
0
votes
0answers
22 views

Send the id of a record to a controller

So I'm using Jeff Douglas's custom lookup blog as a basis for this VF page(located here http://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/) I've gone ahead and ...
1
vote
1answer
37 views

Attempt to dereference a null object : Static method add Id to set

I have below static method where I am trying to add an Id to a set of Ids. This throws subject line error. Can someone please let me know where i am doing wrong? Apex Method public Id ...
1
vote
1answer
35 views

Fill an Id list with no Id ? (trailhead Trigger)

I'm facing an issue understanding a trigger provided by Trailhead (link here), There is a List of Ids declared and filled in a loop, and in that loop only a custom object is taken back (not its Id !)...
0
votes
0answers
30 views

Map of User Ids and Total Amount of Closed Opps This Month

I have a trigger on Opp, after each insert/update I need to recalculate a user's sales for the month. I have the user set and I can do an aggregate query, but how do I connect these in the map? Here ...
1
vote
2answers
39 views

How to generate a record type Id?

Using the IDGenerator class, used on FFLib, how can I generate a RecordType object Id? It is impossible to use IDGenerator.generate(RecordType.SobjectType). If not possible to get the sObjectType, ...
0
votes
3answers
27 views

How do place a field value from a map into a list

I have a map from which I want to place the Id's of a field into a List. I tried the following: Map<String, Relatie__c> uniqueHuish = new map<String, Relatie__c>(); for(Relatie__c rc:...
0
votes
1answer
52 views

Is current record Id accessible before record has been saved?

I have created a Skuid page that overlays Contact record pages. There is a "New" button which creates a new Taskrecord. on load of this new Task record, I wish for a TaskRelation record to be created ...
0
votes
1answer
561 views

Could not update lightning components: Cannot read property 'Id' of undefined

I am using sublime and mavens mate combination. When I am trying to save an existing component, It is giving the following error: "Could not update lightning components: Cannot read property 'Id' of ...
2
votes
1answer
45 views

Visualforce Remoting with Empty String Ids

Here's a fairly simple example illustrating the problem that uses only standard objects: .pages/MyPage.page A page with an input text box and a button. <apex:page controller="Remote_MyPage" >...
0
votes
0answers
21 views

close a visualforce Tab in the console

I am struggling with a a visualforce page displayed on the Service cloud console. This page is used by our CTI to redirect to an account tab if the phone number is found or a search form tab if not. &...
3
votes
1answer
54 views

Database.Batchable List Record Id

I can't get this for loop to work: global void execute(Database.BatchableContext bc, List<Account> accounts){ List<Account> acctsToUpdate = new List<Account>(); List<...
0
votes
2answers
248 views

Try/Catch in for loop

I am trying to grab a list of unique users from a subset of leads and I am running into a System.QueryException: List has no rows for assignment to SObject error. Here is my new code below. If I get ...
0
votes
0answers
71 views

Where could I find a list of all Folder Id's?

As part of code that uploads a file, I need to select a folder to upload to. Some example code I found displays the FolderID for Personal Documents: d.folderid = UserInfo.getUserId(); //this puts ...
0
votes
0answers
65 views

How to pull current page id off of a console view with a trigger

When I call a class/method in my trigger there is a line in the class constructor (string id = ApexPages.currentPage().getParameters().get('id');) that pulls the current page ID. My issue is I am not ...
0
votes
1answer
49 views

Does SOQL return Id, RecordType fields always, without requesting? [duplicate]

I have seen Salesforce returning Id field, and RecordType field in SOQL. for example, Account acc = [select Name from Account limit 1]; System.debug('Returned Id: '+acc.Id); Are these fields always ...
0
votes
2answers
44 views

How to substitute ID with value controller

I have this Apex page which starts a flow which I would like to give an dynamic Id from my controller how would I write the syntax see my page: <apex:page controller="NavigateToContactController"&...
0
votes
2answers
67 views

How to insert duplicate ids to list

In my logic I need to paste objects to list, and those objects will have same ids, but different other fields. Smth like this: List<Contact> retreivedContacts = getContacts(); List<Contact&...
0
votes
1answer
92 views

Rest Call to Salesforce

I am new Salesforce. I am trying to hit the below URL through the Rest client and I am passing the User name and Password as Basic Auth. https://github--staging.cs70.my.salesforce.com/services/...
2
votes
1answer
46 views

Id assignment. At which record count will this pattern break?

I have a record id: a4o110000005EWH I know the object prefix is a4o. I have about 200 of the a40* records in the database. The 11th, 12th, 13th, 14th characters of the 18 digit ID seem to uniquely ...
1
vote
2answers
101 views

How to get sObject from URL

How can I get the SObject from a url? Sample url: https://customcomp--dev.lightning.force.com/one/one.app#/sObject/a044B000001koVmQAI/view?a:t=1490977419216
5
votes
0answers
2k views

ContentDocumentLink Apex after insert trigger error

Edit: I've built an after insert trigger on ContentDocumentLink. On cropredy's direction, I've bulkified my code and I think improved it generally. It "works" in that it accomplishes my business ...
0
votes
0answers
87 views

How do i get the Quote Pricebook2Id from the visualforce page

i have a visualforce page and it has the Pricebook lookup in Quote page Now, how do i get that id from visualforce page to controller because i am going to put that id in where clause in one SOQ ?? &...
0
votes
2answers
418 views

Get Object Id inside the Salesforce Service Cloud Console

In the Salesforce Console the URL is always the same and does not contain the Id of the current object Is there an easy way to get the object Id of the current object while I am on the user ...
2
votes
3answers
438 views

System.StringException: Invalid id: for a lookup field value

Following are the 2 lines of my controller code, system.debug('id is ' + FSInputRecord.Client__c); if(FSInputRecord.Client__c != null && FSInputRecord.Client__c != '') Where FSInputRecord....
1
vote
2answers
121 views

How To Avoid Hard Coding ID

Basically, I have three custom objects: Object1__c : Id, Name, Field1__c Object2__c : Id, Name, Object1__c, Type__c (TypeA,TypeB) Object3__c : Id, Name, Object2__c I created custom lookup fields to ...
5
votes
2answers
222 views

Why is the Id of the detail page URL different from the Apex context?

I have a condition to check the id stored in a custom object; it should match with the user profile id in Apex. CustomObject.ID_Value__c = '00ea0000001p22S'; //I got this from profile detail page url ...
2
votes
2answers
81 views

Map of map in salesforce

How to populate values into this map? There are three objects named job__c, employee__c and a junction object between job__c and employee__c named `JobEmployeeJunction__c´. I want the list of ...
0
votes
0answers
688 views

How to pass detail page custom button URL parameters to VF page in Lightning?

We have following functionality: We have a button on object layout that is URL to visualforce page. Button set object Id as URL parameter. https://vfirst-dev-ed--vfirst.eu5.visual.force.com/apex/...
0
votes
0answers
35 views

How to get Session ID in APEX JOBS [duplicate]

I have an Apex class and want to execute the job through @Future methods, but somehow I am not able to get the session through UserInfo.getsession, this method just returns NULL.
0
votes
1answer
317 views

Passing id to detail page button

I have a scenario where I need to link a lead to another lead if both are related by relation, for ex, a spouse. I created a custom lookup field to link both leads. But if a lead needs to add a spouse ...
1
vote
2answers
110 views

Not able to get Record ID from record

I am not sure why but i tried each and every step to get ID of Current record in Apex class but not getting it. Class : Public Class TestController{ public String bundleId{get;set;} public ...
0
votes
0answers
1k views

Literal value is required for attribute id, need a work around

So, I have an apex:pageBlockTable generated off of an sObject. Take the following table for example: A1 | B1 | C1 A2 | B2 | C2 A3 | B3 | C3 Let us assume that I have an apex:outputPanel that ...
6
votes
5answers
294 views

Identify component type from ID

I am curious to know, is there any way exists from where we can know that a particular id is of type VF/class/trigger/components etc. The way I think/know currently is, to query with "ApexPage" to ...
0
votes
1answer
28 views

Test Error- Changing from List to Id - List has no rows for assignment to SObject

In my test class I have a query: Id oppId = [SELECT Opportunity__c FROM Credit_Review__c LIMIT 1].Opportunity__c; when I use query editor: SELECT Opportunity__c FROM Credit_Review__c LIMIT 1 I get ...
0
votes
0answers
50 views

Weird issue with Debug Statement and trigger handler

I have a weird issue that I'm not even sure how to describe completely. Basically, in my trigger handler class I'm using a set of set of Ids to compare records so only the new records not contained in ...
3
votes
2answers
1k views

Issue with using ContactID as subscriber key in Marketing Cloud

We have set up our Sales Cloud - Marketing Cloud integration where Contact ID is used as the subscriber key. What we've noticed is when we have contact ID as the subscriber relationship on our ...
0
votes
1answer
375 views

How to fix Error: id must be a 15 character

Hi I have developed a custom lookup field in the VF page, The feild is when we enter any string it will show a drop down list with the similar Account names. When I choose My account name and Hit ...
1
vote
1answer
597 views

how to insert account record that has parent account ID

I have 40k records that has parent Account field. I tried to export and Import using data loader , however I got Invalid Cross reference ID. So I have removed all the field that referencing the ID's , ...