• sanjayrs23
  • NEWBIE
  • -1 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 7
    Replies
Hello, I have a Scheduled Trigger on a custom object. I want the flow to only run on records that were created after yesterday's Date/Time. To do this, I created a Date/Time variable that grabs today's date, then I created a formula that takes the variable and subtracts 1, to make it yesterday. Then I go to the start object and put in the conditions "CreatedDate Greater Than or Equal (Yesterday's Date)". However, no matter what I put in for yesterday's date (my formula, date/time straight from the global flow value, etc.) it doesn't accept my field. It either gives me a "We don't recognize that value. Make sure it's a valid date/time value in this format: M/d/yyyy h:mm a" or error that says "The Start element can’t have a record filter condition that references a resource or element. Remove the condition that contains the unsupported value “$Flow.CurrentDateTime” or replace it with a literal value." How do I work around this so that I can get my flow to only run on records that were greated yesterday?

Thank you!
Iam trying to parse json below and access values from javascript. can anybody help me with the code.
json={ 
     "ShareRecords": [],
        "RecordOwnership": {
            "Ownerofrecord": "false"
        },
        "QueryDetails": {
            "UserName": "Wendy West",
            "ObjectName": "SBQQ__Quote__c"
        },
        "ProfileSystemPermissions": {
            "ViewAllData": "false",
            "ProfileSystemPermissionId": "0PS5w000002S7qAGAS",
            "ProfileName": "*Sales",
            "ModifyAllData": "false",
            "hasAccess": "NoAccess"
        },
        "ProfileObjectPermissions": [
            {
                "ViewAllRecords": "true",
                "ProfileObjectPermissionId": "1105w00001Pw2xmAAB",
                "PermissionRead": "true",
                "PermissionName": "X00eo0000000f9DDAAY",
                "PermissionEdit": "true",
                "PermissionDelete": "true",
                "PermissionCreate": "true",
                "ModifyAllRecords": "true",
                "hasAccess": "FullAccess"
            }
        ],
        "PlatformFinalComputedAccess": {
            "MaxAccessLevel": "All",
            "HasTransferAccess": "true",
            "HasReadAccess": "true",
            "HasEditAccess": "true",
            "HasDeleteAccess": "true",
            "HasAllAccess": "true"
        },
        "PermissionSetSystemPermissions": [
            {
                "ViewAllData": "false",
                "PermissionSetSystemPermissionId": "0PS5w000002S7qAGAS",
                "PermissionSetName": "X00eo0000000f9DDAAY",
                "ModifyAllData": "false",
                "hasAccess": "NoAccess"
            },
            {
                "ViewAllData": "false",
                "PermissionSetSystemPermissionId": "0PS5w000002S7rtGAC",
                "PermissionSetName": "Pardot",
                "ModifyAllData": "false",
                "hasAccess": "NoAccess"
            },
            {
                "ViewAllData": "false",
                "PermissionSetSystemPermissionId": "0PS5w000002S7sYGAS",
                "PermissionSetName": "Sales_Cloud_Einstein_PSL",
                "ModifyAllData": "false",
                "hasAccess": "NoAccess"
            },
            {
                "ViewAllData": "false",
                "PermissionSetSystemPermissionId": "0PS5w000002S7t4GAC",
                "PermissionSetName": "EinsteinAnalyticsPlusUserPSL",
                "ModifyAllData": "false",
                "hasAccess": "NoAccess"
            },
            {
                "ViewAllData": "false",
                "PermissionSetSystemPermissionId": "0PS5w000002S7tDGAS",
                "PermissionSetName": "Motivate_Standard_User",
                "ModifyAllData": "false",
                "hasAccess": "NoAccess"
            },
            {
                "ViewAllData": "false",
                "PermissionSetSystemPermissionId": "0PS5w000002S7tEGAS",
                "PermissionSetName": "Align_Standard_User",
                "ModifyAllData": "false",
                "hasAccess": "NoAccess"
            },
            {
                "ViewAllData": "false",
                "PermissionSetSystemPermissionId": "0PS5w000002S7tFGAS",
                "PermissionSetName": "Perform_Standard_User",
                "ModifyAllData": "false",
                "hasAccess": "NoAccess"
            },
            {
                "ViewAllData": "false",
                "PermissionSetSystemPermissionId": "0PS5w000002S7tKGAS",
                "PermissionSetName": "Lightning_Dialer",
                "ModifyAllData": "false",
                "hasAccess": "NoAccess"
            }
        ],
        "PermissionSetObjectPermissions": [
            {
                "ViewAllRecords": "true",
                "PermissionSetObjectPermissionId": null,
                "PermissionRead": "true",
                "PermissionName": "X00eo0000000f9DDAAY",
                "PermissionEdit": "true",
                "PermissionDelete": "true",
                "PermissionCreate": "true",
                "ModifyAllRecords": "true",
                "hasAccess": "FullAccess"
            }
        ],
        "OWDAccessLevel": {
            "OWDAccessLevelId": "000000000000000AAA",
            "InternalSharingModel": "ReadWrite",
            "ExternalSharingModel": "Private"
        },
        "GroupMembership": [
            {
                "Type": "Regular",
                "Name": "SalesReps",
                "GroupId": "00G5w000007NK9CEAW"
            }
        ] 
    };

// Converting JSON object to JS object
 obj = JSON.parse(json);
 QDetails=obj.QueryDetails.UserName;
 console.log(QDetails);
 

}

But when component is deployed , it says json is not defined
Hi,  I receive the following error in a test class but have not been able to repeat them in non test running scenarios.

"System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. 
A flow trigger failed to execute the flow with version ID 301O00000008hM6. 
Contact your administrator for help.: []"

Does anyone know if there could be an issue running flows in test class contexts but not otherwise?

Thanks.

Hi to all

 

I have one requirement that i have to print the data into msword from visualforce page but some special characters coming . Can any one give suggession ........

 

VF Page 

 

 

<apex:page standardController="Weekly_Reports__c" extensions="TVA_Divisional_Report" cache="true"
contentType="application/msWord" showHeader="false" StandardStylesheets="true"  > 
<html>
  <table>  <tr><!-- Used as a Column Headings And As well as retrive the required data -->
<td width = '1000px'><h3>Dealer WinsTotal : </h3><apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}</u><br/><br/>  htmlencode(<apex:outputField value="{!a.Dealer_Wins_Total__c}"/>) <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Sales Call Highlights : </h3>  <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/><br/> </u><apex:outputField value="{!a.Sales_Call_Highlights__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Dealer Wins : </h3> <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}</u><br/><br/> <apex:outputField value="{!a.Dealer_Wins__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Operational Highlights : </h3> <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/> </u><apex:outputField value="{!a.Operational_Highlights__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Won Opportunities/Customer Wins : </h3>  <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}<br/>  <br/></u><apex:outputField value="{!a.Won_Opportunities_Customer_Wins__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Key Initiatives : </h3> <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/></u><apex:outputField value="{!a.Key_Initiatives__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Competitive Information : </h3><apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/></u><apex:outputField value="{!a.Competitive_Information__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>HR Information : </h3> <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/></u><apex:outputField value="{!a.HR_Information__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Warranty Management : </h3> <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/></u><apex:outputField value="{!a.Warranty_Management__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Supply : </h3><apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/></u><apex:outputField value="{!a.Supply__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Cores/Scrap Information : </h3> <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/></u><apex:outputField value="{!a.Cores_Scrap_Information__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'> <h3>EH And S Information : </h3> <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/></u><apex:outputField value="{!a.EH_S_Information__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'><h3>Quality : </h3> <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/></u><apex:outputField value="{!a.Quality__c}"/> <br/></apex:repeat></td></tr><br/>
<tr><td width = '1000px'> <u><b>Comments/Feedback:</b></u>
<h3>Weekly Feedback : </h3> <apex:repeat value="{!searchResults}" var="a"><u>{!a.Owner.name}  <br/></u><apex:outputField value="{!a.Weekly_Feedback__c}"/> <br/></apex:repeat></td></tr>
</table> 
  </html>


</apex:page>

I am having following error in apex class while reading a word document which is uploaded in Document object .

 

"BLOB is not a valid UTF-8 string".

 

Thanks,

Devendra Natani

I've made some changes last week on some of my Appex classes and this morning with the same configuration and when I try to save my changes on the server I get this error message:

 

File only saved locally, not to server

 

So I've created a new project, a new workfolder and  made a checkout of everything and without even changing the code, I still get this error. I have some Appex pages too, but they work fine (compile ans save on server).

 

I notice on ''Monitor Deployment'' that the deployment status is supposedly completed and all my classes have the API version 15 but when I create new classes I can only select API version 16 now. Is this related to my problem?

 

Does some of you knows a good way to fix this?

Hi I'm attempting to write a custom button that generates a contract from an opportunity. It's working except I had to use a hack for the redirect after the contract is generated. Here's the code:

Code:
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}

var opportunity_id = '{!Opportunity.Id}';

var result = sforce.apex.execute("CreateContract","createContractService", {opp_id : opportunity_id});

var newURL = 'https://tapp0.salesforce.com/'+result+'/e—retURL=%2F'+result; //HACK
window.parent.location.replace(newURL);

I'd like to replace the new url with:

Code:
var newURL = "{!URLFOR($Action.Contract.Edit, [result], null, false)}";
Where [result] is the id of the contract that was just created by the web service (the return value). Unfortunately these functions don't seem to have access to the javascript variables. Any ideas how I could pass the contract id to the URLFOR function. Keep in mind I'm in the opportunity detail context.

Thanks in advance for any help