• Will Sun 14
  • NEWBIE
  • 40 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 7
    Replies
Hi Team,

I have setup a login feature from my company website, which we could on the login page we have login via identity provider button on the page to allow to use Salesforce community login page.
But after login, the page is not redirect back to the company website. But if I go back the company site, refresh the page, the site shows the account login correctly and can see the contact details from salesforce.

Please anyone could guide me which step I have missed for the redirection after login.

Thank you 
I have created a visualforce page with popup window feature, and it works on Google Chrome, Edge, but just not working in Safari.
I have allow all popups in Safari settings, but still unable to solve the issue.
Anyone knows how to fix this issue?
Thank you 
Hi developers, I need some helps to deploy apex class from Sandbox to Production.. here is my apex class
 
public class LightningDataTableController {
    @AuraEnabled
    public static List<PricebookEntry> fetchData() {
        //Query and return list of Contacts
        id userId = UserInfo.getUserId();
        User u = [select id, contactId from User where id = : userId];
        id getContactId = u.contactId;
        List<Contact> cont = new List<Contact>();
        cont = [SELECT AccountId, Title, Name, Email FROM Contact Where Id =: getContactId];
        String dealerId = '';
        if(cont != null && cont.size() > 0){
            dealerId = cont[0].AccountId;
        }
        List<PricebookEntry> objRecords = [SELECT Product_Category__c, Product_Name__c,ProductCode,UnitPrice,Inventory_Status__c,Inventory_Description__c from PricebookEntry  where isActive =true AND Pricebook2.isStandard = false AND Pricebook2.Dealer__c =: dealerId LIMIT 900];
        return objRecords;
    }
}
I understand that I need to create a test class, but don't know where to start with and not sure how to pass the production Apex test.. 
Please help 
Hello,
I would like to create a lightning datatable for pricebookentries with search function, so I can achieve as per below:
- when search bar is empty, then show pricebookentries with filtered pricebook (ABC)
- I can search the product name or product code or product category and receive the pricebookentries results within the filtered pricebook (ABC)
Not sure, where to start with, please help
I am trying to create a Visualforce page to display the maximum value of group of custom data fields, but don't know what to start.
Here are the custom data fields:
Repair_hours_1__c
Repair_hours_2__c
Repair_hours_3__c
Repair_hours_4__c
Repair_hours_5__c
Repair_hours_6__c
Repair_hours_7__c
Repair_hours_8__c
Repair_hours_9__c
Repair_hours_10__c
Repair_hours_11__c
Repair_hours_12__c
Repair_hours_13__c
they are formula based with (number) and they are under Custom Object Case_Product__c

Thank you 
Hi All,

I need to a help in VF page, I have created enbed youtube link in VF page which allow users to click and view the youtube video. But how could I setup a autoplay function after you have landed to the VF page?

Thank you 
Hi, 
I need some helps with Visualforce email template, I have received error
Error: Unknown property 'core.email.template.EmailTemplateComponentController.Case'

I have try to capture all asset product and serial number captured in the email related to a Case. And currently relate structure is below:
Case related Asset Booking with Asset and Serial number.

Here is the code I have entered

<messaging:emailTemplate subject="I am Product Loan Approved" recipientType="Contact" relatedToType="Case">
<messaging:plainTextEmailBody >
    <html>
        <Body>
            <Style type="text/css">
                TH{font-size:11px; font-face:arial;background: #CCCCCC;border-width:1;text-align:center}
                TD {font-szie:11px;font-face: verdana}
                Table {border:solid #CCCCCC; border-width:1}
                TR {border: solid #CCCCCC; border-width: 1}
            </style>
            <font face="arial" size="2">
<p>Hi {!Case.Contact},</p>
<br/>
<p>Thank you for submitting an equipment loan</p>
<p>Your Loan request has been approved and we will be in touch once the equipment has been dispatched or ready for pickup</p>
<br/>
<p>Please refer loan product details below: </p>
<table border="0">
    <tr>
        <th>Product Name</th>
        <th>Serial Number</th>
    </tr>
    <apex:repeat var="cx" value="{!relatedTo.Asset_c}">
        <tr>
            <td>{!cx.Asset_Product__c}</td>
            <td>{!cx.Serial_number__c}</td>
        </tr>
    </apex:repeat>
</table>
<p />
</font>
</body>
</html>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
Hi All,

I need some helps to make Note and Attachment as mandatory before submit for approval.
currently I have created a checkbox field name: Attachment_c but don't know how to write a Apex code for Trigger. 
what I would like to do is:
if there is a file in attachment, then checkbox for attachment will be ticked, then you could click "submit for approval"
otherwise, you will receive a error msg: " Please attach claim form for approval"

current coding i have :

trigger TiggerName on attachment (after insert)
{
    Set<Id> attId = new Set<Id>();
    List<sObject> objList = new List<sObject>();
    for(Attachment at :Trigger.New){
        attId.add(at.ParentId);
    }
    if(attId.size() > 0){
        List<Retailer_Return_Request__c> recList = [select Id, Attachments__c from Retailer_Return_Request__c where id IN :attId];
        
        if(recList.size() > 0){
            for(Retailer_Return_Request__c a:recList){
                Retailer_Return_Request__c obj = new Retailer_Return_Request__c();
                obj.Attachments__c = true;
                objList.add(obj);
            }
        }
        
        if(objList.size()>0)
        {
            update objList;
        }                                                                   
    }
}
 with error msg:
Compile Error: Incorrect SObject type: Attachment should be Retailer_Return_Request__c at line -1 column -1

Thank you 

Will
 
I have created a visualforce page with popup window feature, and it works on Google Chrome, Edge, but just not working in Safari.
I have allow all popups in Safari settings, but still unable to solve the issue.
Anyone knows how to fix this issue?
Thank you 
Hi developers, I need some helps to deploy apex class from Sandbox to Production.. here is my apex class
 
public class LightningDataTableController {
    @AuraEnabled
    public static List<PricebookEntry> fetchData() {
        //Query and return list of Contacts
        id userId = UserInfo.getUserId();
        User u = [select id, contactId from User where id = : userId];
        id getContactId = u.contactId;
        List<Contact> cont = new List<Contact>();
        cont = [SELECT AccountId, Title, Name, Email FROM Contact Where Id =: getContactId];
        String dealerId = '';
        if(cont != null && cont.size() > 0){
            dealerId = cont[0].AccountId;
        }
        List<PricebookEntry> objRecords = [SELECT Product_Category__c, Product_Name__c,ProductCode,UnitPrice,Inventory_Status__c,Inventory_Description__c from PricebookEntry  where isActive =true AND Pricebook2.isStandard = false AND Pricebook2.Dealer__c =: dealerId LIMIT 900];
        return objRecords;
    }
}
I understand that I need to create a test class, but don't know where to start with and not sure how to pass the production Apex test.. 
Please help 
Hello,
I would like to create a lightning datatable for pricebookentries with search function, so I can achieve as per below:
- when search bar is empty, then show pricebookentries with filtered pricebook (ABC)
- I can search the product name or product code or product category and receive the pricebookentries results within the filtered pricebook (ABC)
Not sure, where to start with, please help
Hi All,

I need to a help in VF page, I have created enbed youtube link in VF page which allow users to click and view the youtube video. But how could I setup a autoplay function after you have landed to the VF page?

Thank you 
Hi, 
I need some helps with Visualforce email template, I have received error
Error: Unknown property 'core.email.template.EmailTemplateComponentController.Case'

I have try to capture all asset product and serial number captured in the email related to a Case. And currently relate structure is below:
Case related Asset Booking with Asset and Serial number.

Here is the code I have entered

<messaging:emailTemplate subject="I am Product Loan Approved" recipientType="Contact" relatedToType="Case">
<messaging:plainTextEmailBody >
    <html>
        <Body>
            <Style type="text/css">
                TH{font-size:11px; font-face:arial;background: #CCCCCC;border-width:1;text-align:center}
                TD {font-szie:11px;font-face: verdana}
                Table {border:solid #CCCCCC; border-width:1}
                TR {border: solid #CCCCCC; border-width: 1}
            </style>
            <font face="arial" size="2">
<p>Hi {!Case.Contact},</p>
<br/>
<p>Thank you for submitting an equipment loan</p>
<p>Your Loan request has been approved and we will be in touch once the equipment has been dispatched or ready for pickup</p>
<br/>
<p>Please refer loan product details below: </p>
<table border="0">
    <tr>
        <th>Product Name</th>
        <th>Serial Number</th>
    </tr>
    <apex:repeat var="cx" value="{!relatedTo.Asset_c}">
        <tr>
            <td>{!cx.Asset_Product__c}</td>
            <td>{!cx.Serial_number__c}</td>
        </tr>
    </apex:repeat>
</table>
<p />
</font>
</body>
</html>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>