• vishal soni 18
  • NEWBIE
  • -5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 14
    Replies
Hi!

I have a Custom DataSourceConnection class (that extends DataSource.Connection) to retrieve related records for contacts from my server API. I need the record ID for the current contact to make my query, but haven't found a way to retrieve it (ApexPages won't work because it's not using Visualforce).

How can I get the record ID from my DataSourceConnection class?

Thanks for the help!
 
We are developing components for a Community that will used in a mobile app via Mobile Publisher.  From what I have read, I have the impression that Lightning Web Components (vs. Aura) provides greater flexibility for mobile apps.  Please confirm.
Hey,

according to this:
https://help.salesforce.com/articleView?id=mfs_work_order_overview.htm&type=5

I should be able to see the Work Order Overview after tapping the Service Appointment record in the list.

After I do so the Work Order Overview indeed shows up, but ONLY if there is List View called "All Service Appointments" set as the active List View. If I choose any other List View, including custom List Views, and then tap the Service Appointment record, it does not show Work Order overview, but Service Appointment panel with some basic information, which is something I don't want to see, I want the Work Order Overview!

It is a little bit frustrating and I don't know what to do. Does anybody know how to fix this?

 
Hi all,

We need to implement the following pattern at my org:
  • callout to external data source
  • if that callout takes too long (according to some configurable threshold), log an error (ie do some DML)
  • if that callout timed out on the remote server, try it again
Recognizing the potential for the dreaded "You have uncommitted work pending. Please commit or rollback before calling out." error, I put the error logging code in a future method, thus isolating the DML from the callouts. However, the error is still being thrown. I reduced the issue down to this pattern:
public static void foo() {
    Http http = new Http();
    HttpRequest req = new Httprequest();
    req.setEndpoint('https://test.salesforce.com'); //whatever endpoint
    req.setMethod('GET');
    http.send(req); //works fine
    bar();
    http.send(req); //throws calloutexception
}

@future public static void bar() {

}
Am I correct to assume that calling a future method counts as a DML operation? Is there any documentation I'm missing somewhere?

 
I currently have apex class in lightning component that is getting a specific Queue Id to assign as owner of the record the component is launched from.

This is the current  way I'm getting the id, but I'm guessing there is a better way to do this, any ideas?
Group marketingQueue = [SELECT id,Name FROM Group WHERE Type = 'Queue' and DeveloperNAME = 'MarketingProspectLeads'];
         	ID marketingQueueId = marketingQueue.id;
            //l.OwnerId = UserInfo.getUserId();
            system.debug('marketingQueue');
            l.OwnerId = marketingQueueId;

I just need to make sure this can't break so I'm assuming I should add some error checking or be doing this a different way.  Thanks in advance.  
hello,

i am a newbie to salesforce and trying to complete this trailhead challenge and unable to find a way through apex to generate this method for creating new contacts with unique id. as one requirement to pass the challenge is "The 'generateRandomContacts' method must be capable of consistently generating contacts with unique first names."

If somebody successfully completed the task kindly help me.

regards,