function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
alchemyalchemy 

code

           I have come accross the following code in a controller class.

                   String parentId=Apexpages.currentPage().getParameters().get('entityId');

String childId=Apexpages.currentPage().getParameters().get('fentityId');

     I am trying to figure out why is der two Id? I what case can a page have two different entityId

  The code is using this entityId to fetch values from the database but the entity id is not getting fteched how can i fetch the same.......

Shashikant SharmaShashikant Sharma

String parentId=Apexpages.currentPage().getParameters().get('entityId');

String childId=Apexpages.currentPage().getParameters().get('fentityId');

 

This is the syatax to fetch query stiring parameters, query string parameters are those which are being passed in the URL.

 

Like this

 

https://DoaminName/apex/PageName?entityId='016834000095IKH'&fentityId='018803400009IVH'

alchemyalchemy

 Do one reocrd that is being created have two ID like these on URL.

sfdcfoxsfdcfox

No, each record has exactly one unique ID value. The variable names suggest that the second ID is a record that is somehow related to the first ID (a child record, as would be defined by a lookup field on the child record).

Shashikant SharmaShashikant Sharma

No one record has one id that is unique throughout the org.