• V T
  • NEWBIE
  • 2 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 17
    Replies
Hi I am trying to do is write a validation rule for a custom object where users can pass in a from and to date. Now I am trying to make sure that they can't put another record between those 2 dates i.e. from and to dates
for example:
record1: from: 23 dec 2015 to: 24 dec 2015 fine
record2: from: 24 dec 2015 to: 25 dec 2015 Error
record3: from: 1 dec 2015 to: 23 dec 2015 Error
record4: from: 1 dec 2015 to: 11 dec 2015 fine
  • September 16, 2016
  • Like
  • 0

I am integrating with one of the provider who accepts a file to upload in their system. While doing so they require the file to be sent as multipart/form-data in the following format !! 

I tried configuring it as MultiPart form data using Base64 String still it is not working !! 

-H "accept: application/json"
-H "x-api-key: API_KEY" 
-H "x-api-token: API_TOKEN" 
-H "Content-Type: multipart/form-data" 
-F "file=@b4b35527-522d-4228-a266-bdaa80e28a8b.jpg;type=image/jpeg"
I tried integrating Salesforce with VS code.. I installed Salesforce CLI and when I tried creating a project in VS code but it says that Salesforce CLI is not installed.
 The exact error is

"14:48:25.402 sfdx force:project:create --projectname TestProject --outputdir d:\ --manifest
'sfdx' is not recognized as an internal or external command,
operable program or batch file.
14:48:25.492 sfdx force:project:create --projectname TestProject --outputdir d:\ --manifest ended with error spawn sfdx ENOENT
Salesforce CLI is not installed. Install it from https://developer.salesforce.com/tools/sfdxcli"

I know there are so many question which answers this type of questions but my problem is little different. 
I have one object called CRMData__c in that I have Name, CRMDefinition__c(master-detail), Number__c, Date__c fields. 
So CRMData__c will have many records with Date, Number__C some number, and CRMDefinition id. 

I am showing some data example below for better understanding. 
User-added image

I got the record list in one variable List<sObject> result = "My result";
based on this result I want a JSON like below.

 

{
    "Test1": 12,
    "Test2": 11,
    "date": "2018-01-01"
  },
  {
    "Test1": 15,
    "Test2": 23,
    "date": "2018-01-02"
  },
  {
   "Test1": 20,
    "date": "2018-01-03"
  }

Means based on the date it should take the values of Test1 data and Test2 data.. 
I tried so many methods but it gives me the "APEX CPU Time Limit" error.
Because first I have to loop through the dates.
 
Hey everyone,

I currently set up an integration with VSTS and I have been having issues passing basic HTML to a Salesforce Rich Text field and I was hoping to be pushed in the right direction.

According to this document I believe basic tags like <b>, <u>, and <i> should be able to be passed in but I cannot get it to work for the life of me. Is there anything that should be done?

This is the String value that I am attempting to pass into my Rich Text Field:
'This is a test. <b>BOLD </b><i>Italicized</i><u>Underlined</u> This was a test.'



 
Hi Team,

I am new to jQuery and trying to use the draggable feature into my Salesforce VF page which is similar to HTML.

The VF page table has around 20 columns approx and when the page get loaded it displays only first 15 or something and in order to acces further columns we need to use the scroll bar.

The issue is when I try to drag the columns which are hidden using the scroll bar. jQuery would not  recognize those columns and somehow picks and traverses back from only those  columns which were visible during page load(only 15).

So for ex: if i directly scroll the table horizontally and go to the column 18 and drag it to columns before 15 it would not recognize 18 and picks 13th or 12th column.

Please help. Any immediate help appreciated.

Alternatively I can be reached on 7829469487

Kind Regards-
Balaji M 
I am trying to deploy the xml package for Customer_Interaction__b.object using the workbench for this unit. However I deploy and get success message in workbench but cannot see any big object.
  • I did see on the unit page it says that the examples are written for api unit 41.0 but my workbench doesnt allow me to go beyond 40. Does this matter?
  • My trailhead playground is on winter 18.
  • Does it matter what the file name for the object and permission set? (I do have the package.xml)
  • I have tried with and without having 'Single package' selected in workbench deploy
  • I have double checked the workbench is logged into the correct org
User-added image
User-added image




 
Hi Friends,
My class is as below and I need to return the response in JSOn format. My class is returning Accoun t and related contacts. Can any one please help me out?
My class:
*****************
public with sharing class AccountContactList{
public List<account> accountlist{get;set;}
public set<Id> accountids= new set<Id>();
public  List<contact> contactlist{get;set;}
//public string eventid{get;set;}
public AccountContactList(){
   accountlist= [select Id,Name FROM Account];
   for(Account a : accountlist){
       accountids.add(a.Id);
         }
}
public void getcontactdetails(){
contactlist= [select Id,AccountId,Name From contact WHERE AccountId In:accountids];
 system.debug('ContactList:' +contactlist);
}
}


 
  • September 07, 2017
  • Like
  • 0
Hi guys, the quote template has lots of limitations when it comes to styling; I would like to do something custom and need a step-by-step guide. Basically, I would like a "create quote" button on quote pagelayout that references my visualforce page and creates the pdf. 

So I think I need to follow the steps below:
1. Create a custom controller class. Can I do this with standard List controller? Basically, I have to query all the quote and quotelineitems
2. Create a new visual force page using controller from step1, add the proper styling and render as pdf.
3. Create the button on quote with a link to visual force page
Any tips and guides are appreciated. 
Thanks.

Did I miss anything? 
 
  • October 17, 2016
  • Like
  • 0
i have built a vf page:-
<apex:page controller="TheController">

    <apex:stylesheet value="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"/>

    <apex:includeScript value="//code.jquery.com/jquery-1.10.2.js"/>

    <apex:includeScript value="//code.jquery.com/ui/1.11.2/jquery-ui.js"/>

    <script>

        $(document).ready(function(){

            $(document.getElementById("{!$Component.theForm.thePageBlock.theTable}")).find("tbody").sortable();

        });

    </script>

    <apex:form id="theForm">

        <apex:pageBlock id="thePageBlock" >

            <apex:pageBlockTable value="{!accounts}" var="account" id="theTable">

                    <apex:column value="{!account.Name}"/>

                    <apex:column value="{!account.AccountNumber}"/>

                    <apex:column value="{!account.OwnerId}"/>

                    <apex:column value="{!account.Phone}"/>

                    <apex:column value="{!account.Fax}"/>

            </apex:pageBlockTable>

        </apex:pageBlock>       
    </apex:form>

</apex:page>

controller:-

public with sharing class TheController {

    public List<Account> getAccounts()

    {

        return [Select Id, Name, AccountNumber, OwnerId, Phone, Fax From Account limit 10];

    }

}
hi, this code working good.
but it is working in one section (means i can set the record in any place among all records), if i want to drag a single record from all records and want to drop it in a other page block section(like in list1 i want to display all records , then if i drag a single record and drop it in another pageblock section named list2) .
how this will be possible?

please give me solution..
I created a process builder flow for an email alert and added it to our package. When I tried to deploy the change to another developer org (using ant), I'm encountering the below error.

[sf:deploy] -----------------------------------------------------------------------------------
[sf:deploy] Component Failures:
[sf:deploy] 1.  flows/Complaint_Email_Notification-8.flow -- Error: myRule_1_A1 (Action Call) - We can't find an action with the name and action type that you specified.
[sf:deploy] -----------------------------------------------------------------------------------

I came across this know issue that seems like the same issue I'm facing, but says it's fixed.
https://success.salesforce.com/issues_view?id=a1p300000008Y2MAAU

Seems like the myRule_1_A1 is the API name given to the flow components in the background.

Has anyone run into this issue?
I need to be able to drop and drop row within a table in Visualforce, can anyone give a pointer on how to implement this functionality. I use "pageBlockTable" component. I tried using custom JavaScript but not able to get to  <TR> from what "pageBlockTable" generates. Thanks in advance.
Hi guys,

I'm trying to diplay piece of HTML in a rich text area field.

The problem is that it dispayes it as a pure HTML with all the tags,

Here is the HTML I'm trying to insert :

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p><strong>Related issues</strong></p>
<table class="list issues">
<tr class="issue hascontextmenu" id="relation-15556">
<td class="checkbox">*</td>
<td class="subject">
Related to
SX-IB -
<a href="/issues/20226" class="issue tracker-28 status-5 priority-6 priority-lowest closed assigned-to-my-group issue status-30 closed">Bug SW #20226</a>: error message in /var/log/messages: &quot;Failed to get port c...
</td>
<td class="status">Closed</td>
<td class="start_date">04/06/2012</td>
<td class="due_date"></td>
<td class="buttons"><a href="/relations/15556" data-confirm="Are you sure?" data-method="delete" data-remote="true" rel="nofollow" title="Delete relation"></a></td>
</tr>
<tr class="issue hascontextmenu" id="relation-15557">
<td class="checkbox">*</td>
<td class="subject">
Related to
SX-General -
<a href="/issues/365651" class="issue tracker-28 status-38 priority-6 priority-lowest closed assigned-to-my-group issue status-32 closed">Bug SW #365651</a>: [ibd.WARNING]: Failed to get port counters rcv_data MAD_...
</td>
<td class="status">Closed (Rejected)</td>
<td class="start_date">08/01/2014</td>
<td class="due_date"></td>
<td class="buttons"><a href="/relations/15557" data-confirm="Are you sure?" data-method="delete" data-remote="true" rel="nofollow" title="Delete relation"></a></td>
</tr>
</table>
</body>
</html>

Anybody ? 

Thanks !!