• Manoj Thangavel
  • NEWBIE
  • -1 Points
  • Member since 2017
  • Sr Salesforce Developer
  • INNO VALLEY WORKS PRIVATE LIMITED


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 20
    Replies
Hi 

I am trying to use the iPhone camera and take a snap from aura component version 39, since the video tag not supported in the above 39 version.
am using Salesforce mobile app.

Am able to stream the camera in the video tag, but the video always starts in full screen in iPhone.

i have used multiple options as below,

<video id="video" autoplay playsinline >Browser dont support Videos.</video>
<video id="video" playsinline="true" >Browser dont support Videos.</video>

dynamic unescape HTML tag to use the playsinline attribute without assigning value to ti.

Even though, I have added playsinline attribute in the video element. This video tag works from desktop browsers, android phone camera in inline mode video streaming from the camera. But, iPhone always launches in full-screen mode and not able to use it as friendly.

Any idea, to use from LWC or inline mode camera capturing.

Thanks,
Manoj T
Hi,

I have a drop-down filter for week numbers, I want to set the current week as selected always when I entered into the dashboard. 

I have tried these two blogs, but getting error that widget can not be displayed.

https://help.salesforce.com/articleView?id=bi_dashboard_initial_filters_user_tokens.htm&type=5

https://springml.com/blog/dynamically-setting-initial-filters/ 

User-added image

My JSON - I have hard coded for testing, still not working.

{
    "broadcastFacet": true,
    "groups": [],
    "label": "Week_Number__c_1",
    "numbers": [],
    "query": "q = load \"AllData\";\nq = group q by 'Week_Number__c';\nq = foreach q generate string_to_number('Week_Num__c') as 'week';\nq = order q by 'week' asc;\nq = limit q 200;",
    "receiveFacetSource": {
        "mode": "include",
        "steps": []
    },
    "selectMode": "single",
    "start": 53,
    "strings": [],
    "type": "saql",
    "useGlobal": true,
    "visualizationParameters": {
        "parameters": {
            "autoFitMode": "keepLabels",
            "showValues": true,
            "bins": {
                "breakpoints": {
                    "high": 100,
                    "low": 0
                },
                "bands": {
                    "high": {
                        "color": "#008000",
                        "label": ""
                    },
                    "low": {
                        "color": "#B22222",
                        "label": ""
                    },
                    "medium": {
                        "color": "#ffa500",
                        "label": ""
                    }
                }
            },
            "legend": {
                "descOrder": false,
                "showHeader": true,
                "show": true,
                "customSize": "auto",
                "position": "right-top",
                "inside": false
            },
            "axisMode": "multi",
            "tooltip": {
                "showBinLabel": true,
                "measures": "",
                "showNullValues": true,
                "showPercentage": true,
                "showDimensions": true,
                "showMeasures": true,
                "customizeTooltip": false,
                "dimensions": ""
            },
            "visualizationType": "hbar",
            "title": {
                "fontSize": 14,
                "subtitleFontSize": 11,
                "label": "",
                "align": "center",
                "subtitleLabel": ""
            },
            "binValues": false,
            "trellis": {
                "flipLabels": false,
                "showGridLines": true,
                "size": [
                    100,
                    100
                ],
                "enable": false,
                "type": "x",
                "chartsPerLine": 4
            },
            "showActionMenu": true,
            "measureAxis2": {
                "sqrtScale": false,
                "showTitle": true,
                "showAxis": true,
                "title": "",
                "customDomain": {
                    "showDomain": false
                }
            },
            "measureAxis1": {
                "sqrtScale": false,
                "showTitle": true,
                "showAxis": true,
                "title": "",
                "customDomain": {
                    "showDomain": false
                }
            },
            "theme": "wave",
            "dimensionAxis": {
                "showTitle": true,
                "customSize": "auto",
                "showAxis": true,
                "title": "",
                "icons": {
                    "useIcons": false,
                    "iconProps": {
                        "fit": "cover",
                        "column": "",
                        "type": "round"
                    }
                }
            },
            "applyConditionalFormatting": true
        },
        "type": "chart"
    }
}
Hello,

I am trying to add my aura component to a public web site. I have seen that lightning out can help.

I have a simple component and application in lightning. and trying to the website, but not able to succeed. Finally stuck with 500 internal server error.

My component:
<aura:component access="global">
    <p>
        Hello Lightnign World!
    </p>
</aura:component>

My app:
<aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess" >
    <aura:dependency resource="c:TestOutComponent"/>
</aura:application>

I have tried with both SF lightning and Community URL. 
for SF user, am stuck with CORS Error, even though I have added my domain in CORS.

for Community, I can see the lightning library loaded into my web site but finally got 500 internal server error.
Below code has community URL.
Site HTML page:
<html>
    <head>
        <script src="https://prizmahlabs-developer-edition.ap7.force.com/lightning/lightning.out.js"></script>
        
            <script>
            $Lightning.use("c:TestOutApp",   
                           function() {               
                               $Lightning.createComponent(
                                   "c:TestOutComponent", 
                                   { },                 
                                   "lightning",  
                                   function(cmp) {
                                       alert('success!');
                                       // callback when component is created and active on the page
                                   }
                               );
                           },
                           'https://prizmahlabs-developer-edition.ap7.force.com'  // Community endpoint 
                          );
    </script>
    </head>
    <body>
        <h1>Hello World</h1>
        <div id="lightning">
        </div>
    </body>
</html>
I am making a call out to external system from VF page JAVA script code, will it consider against the API call out limits?

My assumptions are, API callout happening form Client-side scripting language, so it will not hit the Salesforce server, will it really considered on the API limits of Salesforce?

Thanks,
Manoj T
I need a good blog for LWC with third party JS chart drawn.

The third-party js not working or the chart not working in LWC.

I need pie chart in LWC.

Thanks in advance.
Apex emails with email attachments not supporting content version file types directly in lightning.

We need alternative option for email attachment type with Contentversion filetypes.
or some i heard mime type.

i am not sure, but nothing works for me now, simply am ignoring the Email attachment content type and appending the fiel name with content version file type as extemsion.
This could be temprory fixbut need a fix.
I have lightning component and would like to process the records of list view.

I tried the below callout to get Query, but 
BODY: [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

Apex Code: 
 String sessionId = '';
    // Refer to the Page
    PageReference reportPage = Page.SessionIDPage;
    // Get the content of the VF page
    String vfContent = reportPage.getContent().toString();
    System.debug('vfContent '+vfContent);
    // Find the position of Start_Of_Session_Id and End_Of_Session_Id
    Integer startP = vfContent.indexOf('Start_Of_Session_Id') + 'Start_Of_Session_Id'.length(),
    endP = vfContent.indexOf('End_Of_Session_Id');
    // Get the Session Id
    sessionId = vfContent.substring(startP, endP);
    System.debug('sessionId '+sessionId);

HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();

String urlInstance = String.valueof(System.URL.getSalesforceBaseURL()).replace('Url:[delegate=','').replace(']','');
String[] instance = urlInstance.split('\\.');
String endPoint = 'https://dc3--dc3dev.my.salesforce.com/services/data/v46.0/sobjects/Contact/listviews/00Br0000001C3QSEA0/describe';
System.debug('The End Point-->' + endPoint);
req.setEndpoint(endPoint);
req.setHeader('Authorization', 'Bearer ' + sessionId);
req.setMethod('GET');
req.setTimeout(20000);

res = http.send(req);

System.debug('BODY: '+res.getBody());
        System.debug('STATUS:'+res.getStatus());
        System.debug('STATUS_CODE:'+res.getStatusCode());

VF page:
<apex:page >
    Start_Of_Session_Id{!$Api.Session_ID}End_Of_Session_Id
</apex:page>

i ref the below Q&A
https://salesforce.stackexchange.com/questions/110515/getting-session-id-in-lightning

Please get me if anything i missed. 
Hi,

I have vf page and embeded that into to community. The community is accesilbe for the public without authentication.

I am not able to see the VF page in my community as a public user.

I have enabled all the profiles to the VF page, still not visible, any luck ?

Thanks,
Manoj T
Hi Everyone,

I have enabled REST API for my org and tried to insert a pdf document into Document object. i have tried https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm the steps.

Those steps working fine for text file from psotman.

But the PDF documents are not able to insert.
User-added image
User-added image

But, the pdf document is not readable in Salesforce reord.

I have tried another way, and recevied below error message.
User-added image

Is there any proper steps to make this callout succes from postman or any java code to make this callout to insert pdf document ?
Hi Everyone,

I have an public VF page and that page will ollect payment from customers credit card, and we want to integrate with paypal for gateway.

I caould not find any REST api for credit card collection but ols NVP SOAP service avaialble, but it is depricated.

Please post any working paypal REST API documentaion for credit card payment. 
Hello,

I am trying to add my aura component to a public web site. I have seen that lightning out can help.

I have a simple component and application in lightning. and trying to the website, but not able to succeed. Finally stuck with 500 internal server error.

My component:
<aura:component access="global">
    <p>
        Hello Lightnign World!
    </p>
</aura:component>

My app:
<aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess" >
    <aura:dependency resource="c:TestOutComponent"/>
</aura:application>

I have tried with both SF lightning and Community URL. 
for SF user, am stuck with CORS Error, even though I have added my domain in CORS.

for Community, I can see the lightning library loaded into my web site but finally got 500 internal server error.
Below code has community URL.
Site HTML page:
<html>
    <head>
        <script src="https://prizmahlabs-developer-edition.ap7.force.com/lightning/lightning.out.js"></script>
        
            <script>
            $Lightning.use("c:TestOutApp",   
                           function() {               
                               $Lightning.createComponent(
                                   "c:TestOutComponent", 
                                   { },                 
                                   "lightning",  
                                   function(cmp) {
                                       alert('success!');
                                       // callback when component is created and active on the page
                                   }
                               );
                           },
                           'https://prizmahlabs-developer-edition.ap7.force.com'  // Community endpoint 
                          );
    </script>
    </head>
    <body>
        <h1>Hello World</h1>
        <div id="lightning">
        </div>
    </body>
</html>
Hi Everyone,

i got stuck with one requirement. below is the scenario.Please help in resolving the issue.
I have a custom object called xyz with status picklist field. i have created a profile with customer community licence. this profile is currently having Read permission on object. i have created custom Button(Lightning Quick Action which calls flow to update record) on record. when i login as cummunity user, i need to click on that button to change status picklist. Currently i'm getting error while updating status because it has READ permission.
Below is the error message:
This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: entity type cannot be updated: This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: entity type cannot be updated:
is there any work around for this Problem without changing permissions in the Profile level.
I hope the question is clear to understand


Thanks,
Lakshman
Selected Navigation Button: NEXT
DECISION: Relatedbookingsearch
Outcome executed: Field_is_Blank
Outcome conditions: 
1. {!SearchRelatedBookAccount} () Equals
2. {!OngoingGroup} (true) Equals true
3. {!Registration_Type} (Annual) Does not equal {!Full} (Full)
4. {!OngoingGroup} (true) Does not equal true
5. {!AgentName1} (Lorraine Dougall) Does not equal {!PleaseSelect} (Please Select)
Logic: Advanced Logic ((1 AND ((2 AND 3) OR 4)) AND 5)
GET RECORDS: Discount_Lookup_0_0
Find one Discountc record where:
Expiredc Equals false
Non_Transferc Equals true
Name Equals {!Discount_code2} ()
Result
Failed to find record.
DECISION: ValidYesNo3
Outcome executed: DiscountValid3
Outcome conditions: 
{!DiscountValid} (true) Equals true
CREATE RECORDS: Create_Student_0
Create one Account record where:
BillingCity = {!Billing_City} ()
BillingPostalCode = {!Billing_Postcode} ()
BillingState = {!Billing_County} ()
BillingStreet = {!Billing_Street} ()
Date_of_Birthc = {!Date_of_Birth} (null)
Date_of_Last_Bookingc = {!$Flow.CurrentDate} (09 July 2019)
FirstName = {!First_Name} (Iris)
LastName = {!Last_Name} (Fritschi)
PersonEmail = {!Email} (iris_fritschi@hotmail.com)
Phone = {!Phone} ()
RecordTypeId = 012w0000000Jvw6
Salutation = {!SALUTATIONCHOICE} (Ms.)
Result
Failed to create record.
Error Occurred: This error occurred when the flow tried to create records: DUPLICATE_VALUE: duplicate value found: Student_Email_Uniquec duplicates value on record with id: 0011r00001vuSPZ. You can look up ExceptionCode values in the SOAP API Developer Guide.
Is there a way to manually fire lightning inputfield (which is a picklist) onChange event via Lightning JS controller?
Apex emails with email attachments not supporting content version file types directly in lightning.

We need alternative option for email attachment type with Contentversion filetypes.
or some i heard mime type.

i am not sure, but nothing works for me now, simply am ignoring the Email attachment content type and appending the fiel name with content version file type as extemsion.
This could be temprory fixbut need a fix.
I have lightning component and would like to process the records of list view.

I tried the below callout to get Query, but 
BODY: [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

Apex Code: 
 String sessionId = '';
    // Refer to the Page
    PageReference reportPage = Page.SessionIDPage;
    // Get the content of the VF page
    String vfContent = reportPage.getContent().toString();
    System.debug('vfContent '+vfContent);
    // Find the position of Start_Of_Session_Id and End_Of_Session_Id
    Integer startP = vfContent.indexOf('Start_Of_Session_Id') + 'Start_Of_Session_Id'.length(),
    endP = vfContent.indexOf('End_Of_Session_Id');
    // Get the Session Id
    sessionId = vfContent.substring(startP, endP);
    System.debug('sessionId '+sessionId);

HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();

String urlInstance = String.valueof(System.URL.getSalesforceBaseURL()).replace('Url:[delegate=','').replace(']','');
String[] instance = urlInstance.split('\\.');
String endPoint = 'https://dc3--dc3dev.my.salesforce.com/services/data/v46.0/sobjects/Contact/listviews/00Br0000001C3QSEA0/describe';
System.debug('The End Point-->' + endPoint);
req.setEndpoint(endPoint);
req.setHeader('Authorization', 'Bearer ' + sessionId);
req.setMethod('GET');
req.setTimeout(20000);

res = http.send(req);

System.debug('BODY: '+res.getBody());
        System.debug('STATUS:'+res.getStatus());
        System.debug('STATUS_CODE:'+res.getStatusCode());

VF page:
<apex:page >
    Start_Of_Session_Id{!$Api.Session_ID}End_Of_Session_Id
</apex:page>

i ref the below Q&A
https://salesforce.stackexchange.com/questions/110515/getting-session-id-in-lightning

Please get me if anything i missed. 
Hi,

I have vf page and embeded that into to community. The community is accesilbe for the public without authentication.

I am not able to see the VF page in my community as a public user.

I have enabled all the profiles to the VF page, still not visible, any luck ?

Thanks,
Manoj T
Hi Everyone,

I have an public VF page and that page will ollect payment from customers credit card, and we want to integrate with paypal for gateway.

I caould not find any REST api for credit card collection but ols NVP SOAP service avaialble, but it is depricated.

Please post any working paypal REST API documentaion for credit card payment. 
folowing is the lighting code : 

<aura:component controller="ActivateAgreementController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction"  >
    <aura:handler name="init" value="{!this}" action="{!c.validateandactivateagreement}"/>
    <aura:attribute name="smsg" type="Boolean" default="false"/>
    <aura:attribute name="emsg" type="Boolean" default="false"/>
    <aura:attribute name="message" type="String"/>
    <aura:if isTrue="{!v.emsg}">
        <ui:message title="Error" severity="error" closable="false">
           Owner Update failed. Please try again later or contact your System Admin.
        </ui:message>
    </aura:if>
    <aura:if isTrue="{!v.smsg}">
        <ui:message title="Confirmation" severity="confirm" closable="false">
            <div>

          ResultMessage:<ui:outputText value="{!v.message}"/>

     </div>
           Successfully updated Owner.
        </ui:message>
    </aura:if>
</aura:component>

({
    validateandactivateagreement : function(component, event, helper) {
       alert('start1');
        var action = component.get("c.agreementactivate");
        action.setParams({"id": component.get("v.recordId")});
        action.setCallback(component,
        function(response) {
            var state = response.getReturnValue();
            if (state === true){
                $A.get('e.force:refreshView').fire();
                component.set("v.smsg", true);
                 cmp.set("v.message", "hi");
            } else {
                 component.set("v.emsg", true);
            }
        }
        );
        $A.enqueueAction(action);
        
    }
})

global with sharing class ActivateAgreementController {
    //Constructor
    public ActivateAgreementController(ApexPages.StandardController controller) {
    }
    //Accepts the record id and sends a boolean status about the updation
    @AuraEnabled @RemoteAction
    global static Boolean agreementactivate(Id Agreementid){
        try{
            //Group oppQueue = [select Id from Group where  Type = 'Queue' AND DeveloperName = 'Opportunity_Review_Queue'];
            //Opportunity crec = [Select Id, OwnerId from Opportunity where Id=:oppid];
            //crec.OwnerId = oppQueue.Id;
            //update crec;
            
            contract contract_record = [select Record_Type_Name__c,AccountId,telia_TC_Party__c,telia_Customer_contact_person__c,telia_Sales_person__c 
                                        ,telia_Sales_responsible__c ,telia_Confidentiality_class__c,telia_Start_date__c ,telia_Signature_alternative__c
                                        ,CustomerSignedId ,CustomerSignedDate,telia_Customer_Signature_Place__c,Telia_Signed_By__c,Telia_Signed_Date__c,Signatories_Required__c from 
                                        contract where Id=:Agreementid];
                                        
                                        
           return true;
        }
        catch(Exception e){
            return false;
        }
    }
}

its failling from quick action in lighting .error message : 
Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details.
Action failed: forceChatter:lightningComponent$controller$doInit [Error while creating content for lightning component quick action]
quickActionHandlerHelper.js failed to create component - forceChatter:lightningComponent
Can anyone tell me, how i use html5 'video' tag in my custom lightning component to play video file ?


Any help will be greatly appreciated.
We have an active community with a visualforce page with the following code:

<apex:page >
<flow:interview name="New_User_Flow"/>
</apex:page>

When you navigate to this page within the community: https://XXX.force.com/New_User_Flow it shows error:

https://XXX.force.com is down for maintenance Sorry for the inconvenience. We'll be back shortly. Please email us if you need to get in touch.

This visualforce page has been added under "Public Access Settings" for the community profile (Community > Admin > Pages > Go to Force.com).

How can we make this page accessible? It should display a flow as per visualforce page.
Hi all

I'm executing this query from Java code using REST service:

SELECT Id, Name, StageName, Amount FROM Opportunity WHERE AccountId = 'xyz' AND OwnerId = 'abc'

I have System Administrator role, View All permission, Object level full permission on Opportunity object, all field level permissions on Opportunity fields.

Still i'm getting this error:

sObject type 'Opportunity' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.","errorCode":"INVALID_TYPE"

can you please suggest what i'm missing

Hello,

 

I'm trying to upload a pdf using REST API into salesforce.

 

Here's the curl:

 

https://na1.salesforce.com/services/data/v20.0/sobjects/Document/

 I'm doing a POST with a multipart/form-data. I'm sending the variable Body in the content containing my file.

 

Here's the error I'm getting:

 

[{"message":"Multipart message must include a non-binary part","errorCode":"INVALID_MULTIPART_REQUEST"}]

 

Any help?

 

Best Regards,

 

Sabine

Hi,

 

I am trying to use the setInReplyTo option in single email message to solve a conversation threading problem. I am querying for an emailmessage and then setting that Id as value for the method. I am encountering run time errors with this

 

System.EmailException: SendEmail failed. First exception on row 0; first error: INVALID_MESSAGE_ID_REFERENCE, In-Reply-To header is not valid.: []

 

I am not sure how to set this up to work. Please help.

 

Thanks

KD