• hd sd
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 33
    Replies
Hi All,
 
I am trying to run below code snippet with logged in customer user but I am unable to fetch the prices in response.
 
Request Body:
{"searchTerm":"beans","refinements":[],"page":0,"includePrices":true}
Response Body
{
  "categories": {
    "category": {
      "description": "All Categories",
      "id": null,
      "name": "All Categories"
    },
    "children": [
      {
        "category": {
          "description": null,
          "id": "0ZG68000000LSWMGA4",
          "name": "Coffee Beans"
        },
        "children": [],
        "productCount": 3
      }
    ],
    "productCount": 3
  },
  "correlationId": "65c251d8c6369165",
  "facets": [],
  "locale": "en_US",
  "productsPage": {
    "currencyIsoCode": null,
    "pageSize": 20,
    "products": [
      {
        "defaultImage": {
          "alternateText": "Dark Roast Whole Bean Coffee",
          "contentVersionId": "5OU68000000LTSiGAO",
          "id": "2pm68000000PaRZAA0",
          "mediaType": "Image",
          "sortOrder": 0,
          "thumbnailUrl": null,
          "title": "servlet-servletimageserver",
          "url": "https://c.na139.content.force.com/servlet/servlet.ImageServer?id=0154W00000CxsJK&oid=00D4W0000054JBn"
        },
        "fields": {
          "LastModifiedDate": {
            "value": "2023-02-17T16:30:21Z"
          },
          "DisplayUrl": {
            "value": null
          },
          "IsDeleted": {
            "value": "false"
          },
          "Description": {
            "value": "2.5 lbs of dark roasted, single-origin, fair trade and Organic Arabica bean from the Chiapas region of Mexico. It is nutty with notes of caramel and slight baker's chocolate. It is fresh roasted and rated Premium Grade "1," the highest rating available for coffee."
          },
          "ProductCode": {
            "value": "DRW-1"
          },
          "IsActive": {
            "value": "true"
          },
          "ExternalId": {
            "value": null
          },
          "LastViewedDate": {
            "value": "2023-03-17T17:54:22Z"
          },
          "UserRecordAccessId": {
            "value": null
          },
          "LastReferencedDate": {
            "value": "2023-03-17T17:54:22Z"
          },
          "StockKeepingUnit": {
            "value": "DRW-1"
          },
          "CurrencyIsoCode": {
            "value": "EUR"
          },
          "ExternalDataSourceId": {
            "value": null
          },
          "Name": {
            "value": "Dark Roast Whole Bean Coffee (Sample)"
          },
          "SystemModstamp": {
            "value": "2023-02-17T16:30:22Z"
          },
          "IsArchived": {
            "value": "false"
          },
          "Type": {
            "value": null
          },
          "CreatedById": {
            "value": "00568000004enxO"
          },
          "QuantityUnitOfMeasure": {
            "value": null
          },
          "CreatedDate": {
            "value": "2023-01-31T10:51:24Z"
          },
          "Family": {
            "value": "Personal"
          },
          "ProductClass": {
            "value": "Simple"
          },
          "LastModifiedById": {
            "value": "00568000004enxO"
          },
          "TaxPolicyId": {
            "value": null
          }
        },
        "id": "01t68000000WskZAAS",
        "name": "Dark Roast Whole Bean Coffee (Sample)",
        "prices": null,
        "productClass": "Simple",
        "purchaseQuantityRule": null,
        "variationAttributeSet": null
      },
      {
        "defaultImage": {
          "alternateText": "Medium Roast Coffee",
          "contentVersionId": "5OU68000000LTScGAO",
          "id": "2pm68000000PaRWAA0",
          "mediaType": "Image",
          "sortOrder": 0,
          "thumbnailUrl": null,
          "title": "servlet-servletimageserver",
          "url": "https://c.na139.content.force.com/servlet/servlet.ImageServer?id=0154W00000CxsJ5&oid=00D4W0000054JBn"
        },
        "fields": {
          "LastModifiedDate": {
            "value": "2023-02-17T16:30:21Z"
          },
          "DisplayUrl": {
            "value": null
          },
          "IsDeleted": {
            "value": "false"
          },
          "Description": {
            "value": "Grown in Colombia's rich volcanic soil, this coffee is as distinctive as the countryside. Our medium roast coffee delivers a signature nutty flavor. We use 100% natural roasted arabica beans to create a smooth and balanced, yet crisp, cup of coffee."
          },
          "ProductCode": {
            "value": "MRC-1"
          },
          "IsActive": {
            "value": "true"
          },
          "ExternalId": {
            "value": null
          },
          "LastViewedDate": {
            "value": "2023-02-14T11:34:04Z"
          },
          "UserRecordAccessId": {
            "value": null
          },
          "LastReferencedDate": {
            "value": "2023-02-14T11:34:04Z"
          },
          "StockKeepingUnit": {
            "value": "MRC-1"
          },
          "CurrencyIsoCode": {
            "value": "EUR"
          },
          "ExternalDataSourceId": {
            "value": null
          },
          "Name": {
            "value": "Medium Roast Coffee (Sample)"
          },
          "SystemModstamp": {
            "value": "2023-02-24T15:25:10Z"
          },
          "IsArchived": {
            "value": "false"
          },
          "Type": {
            "value": null
          },
          "CreatedById": {
            "value": "00568000004enxO"
          },
          "QuantityUnitOfMeasure": {
            "value": null
          },
          "CreatedDate": {
            "value": "2023-01-31T10:51:24Z"
          },
          "Family": {
            "value": "Personal"
          },
          "ProductClass": {
            "value": "Simple"
          },
          "LastModifiedById": {
            "value": "00568000004enxO"
          },
          "TaxPolicyId": {
            "value": null
          }
        },
        "id": "01t68000000WskXAAS",
        "name": "Medium Roast Coffee (Sample)",
        "prices": null,
        "productClass": "Simple",
        "purchaseQuantityRule": null,
        "variationAttributeSet": null
      },
      {
        "defaultImage": {
          "alternateText": "Costa Rican Decaf Roast Bean Bag",
          "contentVersionId": "5OU68000000LTSUGA4",
          "id": "2pm68000000PaRSAA0",
          "mediaType": "Image",
          "sortOrder": 0,
          "thumbnailUrl": null,
          "title": "servlet-servletimageserver",
          "url": "https://c.na139.content.force.com/servlet/servlet.ImageServer?id=0154W00000CxsJF&oid=00D4W0000054JBn"
        },
        "fields": {
          "LastModifiedDate": {
            "value": "2023-02-17T16:30:21Z"
          },
          "DisplayUrl": {
            "value": null
          },
          "IsDeleted": {
            "value": "false"
          },
          "Description": {
            "value": "A water processed decaf that is vivid and packed with flavor, Costa Rican Decaf is made from 100% organic water processed decaffeinated beans. The Decaf is surprisingly (some say freakishly) versatile: about the only preparation we don?t see consistently enjoyable results in is the siphon."
          },
          "ProductCode": {
            "value": "CR-DEC"
          },
          "IsActive": {
            "value": "true"
          },
          "ExternalId": {
            "value": null
          },
          "LastViewedDate": {
            "value": "2023-02-13T13:47:41Z"
          },
          "UserRecordAccessId": {
            "value": null
          },
          "LastReferencedDate": {
            "value": "2023-02-13T13:47:41Z"
          },
          "StockKeepingUnit": {
            "value": "CR-DEC"
          },
          "CurrencyIsoCode": {
            "value": "EUR"
          },
          "ExternalDataSourceId": {
            "value": null
          },
          "Name": {
            "value": "Costa Rican Decaf Roast Bean Bag (Sample)"
          },
          "SystemModstamp": {
            "value": "2023-02-17T16:30:22Z"
          },
          "IsArchived": {
            "value": "false"
          },
          "Type": {
            "value": null
          },
          "CreatedById": {
            "value": "00568000004enxO"
          },
          "QuantityUnitOfMeasure": {
            "value": null
          },
          "CreatedDate": {
            "value": "2023-01-31T10:51:24Z"
          },
          "Family": {
            "value": "Personal"
          },
          "ProductClass": {
            "value": "Simple"
          },
          "LastModifiedById": {
            "value": "00568000004enxO"
          },
          "TaxPolicyId": {
            "value": null
          }
        },
        "id": "01t68000000WskVAAS",
        "name": "Costa Rican Decaf Roast Bean Bag (Sample)",
        "prices": null,
        "productClass": "Simple",
        "purchaseQuantityRule": null,
        "variationAttributeSet": null
      }
    ],
    "total": 3
  }
}
Note:
The customer user is assigned to the buyer of the buyer group which is linked to the store
There is entitlement policy linked to the above buyer group with visible price and visible product flag as checked.
The Account currency, pricebook entry currency and user currency all match(EUR)
If I dont use API and use standard search component then I am able to see the prices correctly. 
Please tell me different approaches of dealing with this issue. 

If the callout is from UI (button) or a flow (external service), the response data is invalid and there is a valdation rule on that field (response data), same transaction and user is expecting to see the result on UI.
I can have custom object which stores the failed data, but how about saving the record in this instance since validation rule doesn't let us?

I am looking for approaches to save the record when we have a validation rule instead of using code.

I can think of two ways to save the record: 
1. In the validation rule: which lets the record to be saved if the field is blank. For example having CONTAINS OR BEGINS functions in the formula. 
2. Instead of a validation rule, no code, we can do the callout from apex and have the validation there, if there is invalid or failed validation, to manipulate the data to allow the record to be saved. 



 
Does health cloud lightning console comes along with Health cloud package? I have installed health cloud package, not able to see this console. When I try to create a console, there is no option to add household (acount contact relationship object) to the console. 
I'm using system admin profile with required permission sets
I am trying to realize SSO with a social account in Community. Link Community users and social accounts from [Link with existing users] issued in the authentication provider settings I am assuming user operation, but is it possible to customize the screen that links this Community user and social account independently?
APEX:

public class OAuth_Box_Example {
    public Mydata__c data         {set;get;}
    public String code             {set;get;}
    public String accessToken       {set;get;}
    public String result             {set;get;}
    public String callbackurl         {set;get;}
    
    public  OAuth_Box_Example(){
        data=[Select id,ClientId__c,ClientSecret__c from Mydata__c where name='Box'];
        callbackurl='https://ap16.salesforce.com/apex/BoxResponse';
    }
    
    public PageReference requestCode(){
        String url='https://account.box.com/api/oauth2/authorize?';
        url=url+'response_type=code&client_id='+data.clientId__c;
        url=url+'&redirect_uri='+callbackurl;
        url=url+'&state=Vikas';
        PageReference p=new PageReference(url);
        return p;
    }
    
    public void readCode(){
        code=Apexpages.currentPage().getParameters().get('code');
    }
    public void requestToken(){
        String url='https://api.box.com/oauth2/token';        
        Http p=new Http();
        HttpRequest request=new HttpRequest();
        request.setEndpoint(url);
        request.setMethod('POST');
        String body='grant_type=autherization_code&code='+code;
        body=body+'&client_id='+data.ClientId__c;
        body=body+'&client_secret='+data.ClientSecret__c;
        request.setBody(body);
        HttpResponse response=p.send(request);
        String jsonBody=response.getBody();
        System.JSONParser jp=JSON.createParser(jsonBody);
        while(jp.nextToken()!=null){
            if(jp.getText()=='access_token'){
                jp.nextToken();
                accessToken=jp.getText();
            }
        }
        
    }    
}

VISUAL FORCE:

1) BoxResponse:

<apex:page controller="OAuth_Box_Example" action="{!readCode}">
    <apex:form >
        <apex:pageBlock title="Token & Action" id="pb">
            <apex:pageBlockButtons location="top">
                <apex:commandButton value="Token" action="{!requestToken}" reRender="pb"/>
            </apex:pageBlockButtons>
            Client Id:{!data.ClientId__c}<br/><br/>
            CallbackSecret:{!data.ClientSecret__c}<br/><br/>
            RedirectUrl:{!callbackurl}<br/><br/>
            Code:{!code}<br/><br/>
            AccessToken:{!accessToken}
        </apex:pageBlock>
    </apex:form>
</apex:page>


2)Box_Home:

<apex:page controller="OAuth_Box_Example">
    <apex:form >
        <apex:pageBlock title="OAuth">
            <apex:pageBlockButtons location="top">
                <apex:commandButton value="Submit" action="{!requestCode}"/>
            </apex:pageBlockButtons>
            Client Id:{!data.ClientId__c}<br/><br/>
            CallbackUrl:{!callbackurl}<br/><br/>
            State : Vikas
        </apex:pageBlock>
    </apex:form>
</apex:page>
How do I use Set History Tracking on Object Manager - Account - Field and Relationships? 

I clicked Enable Account History. The description underneath it says, "This page allows you to select the fields you want to track on the Account History related list. Whenever a user modifies any of the fields selected below, the old and new field values are added to the History related list as well as the date, time, nature of the change, and user making the change. Note that multi-select picklist and large text field values are tracked as edited; their old and new field values are not recorded." 

This description is not clear and is confusing please explain.
Hey,
I am using the brasil tv new mod (https://techbigs.com/pt/brasil-tv-new.html), a popular movie player in Brazil. I want to know how do I pass the language parameter to the OAUTH URL and then read that parameter to open the Sign in in this application language page?
Help me!!
How to create calculator page in javascript only(no controller) in visualforce page??
plz help me in this...
how to write 100% test class for Calculator CLass. Unit Testing on the Lightning Platform  Write Negative Tests
Estoy intentando crear una carpeta nueva para guardar mis mis informes. Pero al apretar el botón de guardar aparece un cartel que dice: No se puede crear una carpeta con ese nombre. Probé con muchos nombres distintos pero no acepta. Alguien me puede explicar qué pasa?
I've looked and looked as it seems like a syntax error, but can't find one. I have a 1 VF page and 2 classes. See below:



*** VISUALFORCE PAGE ***


<apex:page controller="HIC_SignPageController" showHeader="false"> <style type="text/css"> .message infoM3{ width : 30%; } div { margin-top:1em; margin-bottom:1em; } input { padding: .5em; margin: .5em; } select { padding: .5em; margin: .5em; } #signatureparent { color:darkblue; background-color:darkgrey; /*max-width:600px;*/ padding:20px; } /*This is the div within which the signature canvas is fitted*/ #signature { border: 2px dotted black; background-color:lightgrey; } /* Drawing the 'gripper' for touch-enabled devices */ html.touch #content { float:left; width:92%; } html.touch #scrollgrabber { float:right; width:4%; margin-right:2%; background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAFCAAAAACh79lDAAAAAXNSR0IArs4c6QAAABJJREFUCB1jmMmQxjCT4T/DfwAPLgOXlrt3IwAAAABJRU5ErkJggg==) } html.borderradius #scrollgrabber { border-radius: 1em; } </style> <apex:form > <apex:pageBlockSection columns="2"><apex:pageBlock title="Customer Information"> <apex:outputField value="{!leadObj.name}"/> <apex:outputField value="{!leadObj.email}"/> <apex:outputField value="{!leadObj.phone}"/> <apex:outputField value="{!leadObj.Move_Date__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Pick-Up Address"> <apex:outputField value="{!leadObj.Pickup_Address__c}"/> <apex:outputField value="{!leadObj.Pickup_Unit_No__c}"/> <apex:outputField value="{!leadObj.Pickup_City__c}"/> <apex:outputField value="{!leadObj.Pickup_State__c}"/> <apex:outputField value="{!leadObj.Pickup_Zipcode__c}"/> <apex:outputField value="{!leadObj.Pickup_Notes__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Delivery Address"> <apex:outputField value="{!leadObj.Delivery_Address__c}"/> <apex:outputField value="{!leadObj.Delivery_Unit_No__c}"/> <apex:outputField value="{!leadObj.Delivery_City__c}"/> <apex:outputField value="{!leadObj.Delivery_State__c}"/> <apex:outputField value="{!leadObj.Delivery_Zipcode__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Inventory"> <apex:outputField value="{!leadObj.Appliances_Dishwasher__c}"/> <apex:outputField value="{!leadObj.Appliances_Dryer__c}"/> <apex:outputField value="{!leadObj.Appliances_Freezer__c}"/> <apex:outputField value="{!leadObj.Appliances_Microwave__c}"/> <apex:outputField value="{!leadObj.Appliances_Dishwasher__c}"/> <apex:outputField value="{!leadObj.Appliances_Range_Stove__c}"/> <apex:outputField value="{!leadObj.Appliances_Refrigerator__c}"/> <apex:outputField value="{!leadObj.Appliances_Toaster_Oven__c}"/> <apex:outputField value="{!leadObj.Appliances_Washer__c}"/> <apex:outputField value="{!leadObj.Bedroom_Armoire__c}"/> <apex:outputField value="{!leadObj.Bedroom_Bunk_Bed__c}"/> <apex:outputField value="{!leadObj.Bedroom_Changing_Table__c}"/> <apex:outputField value="{!leadObj.Bedroom_Chest_of_Drawers__c}"/> <apex:outputField value="{!leadObj.Bedroom_Crib__c}"/> <apex:outputField value="{!leadObj.Bedroom_Dresser_Long__c}"/> <apex:outputField value="{!leadObj.Bedroom_Dresser_Tall__c}"/> <apex:outputField value="{!leadObj.Bedroom_Full_Bed__c}"/> <apex:outputField value="{!leadObj.Bedroom_King_Bed__c}"/> <apex:outputField value="{!leadObj.Bedroom_Night_Stand__c}"/> <apex:outputField value="{!leadObj.Bedroom_Queen_Bed__c}"/> <apex:outputField value="{!leadObj.Bedroom_Rocker_Glider_Chair__c}"/> <apex:outputField value="{!leadObj.Bedroom_Twin_Bed__c}"/> <apex:outputField value="{!leadObj.Boxes_Book_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Dishpack_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Large_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Large_Frame_Mirror_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Mattress_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Medium_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_TV_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Wardrobe_Box__c}"/> <apex:outputField value="{!leadObj.Dining_Buffet__c}"/> <apex:outputField value="{!leadObj.Dining_China_Cabinet__c}"/> <apex:outputField value="{!leadObj.Dining_Corner_Cabinet__c}"/> <apex:outputField value="{!leadObj.Dining_Dining_Chairs__c}"/> <apex:outputField value="{!leadObj.Dining_Dining_Table__c}"/> <apex:outputField value="{!leadObj.Kitchen_Bakers_Rack__c}"/> <apex:outputField value="{!leadObj.Kitchen_Bar_High_Chair__c}"/> <apex:outputField value="{!leadObj.Kitchen_Bar_High_Table__c}"/> <apex:outputField value="{!leadObj.Kitchen_Butcher_Block_Table__c}"/> <apex:outputField value="{!leadObj.Kitchen_Dishwasher__c}"/> <apex:outputField value="{!leadObj.Kitchen_Freezer__c}"/> <apex:outputField value="{!leadObj.Kitchen_Kitchen_Cabinet__c}"/> <apex:outputField value="{!leadObj.Kitchen_Kitchen_Cart__c}"/> <apex:outputField value="{!leadObj.Kitchen_Kitchen_Chairs__c}"/> <apex:outputField value="{!leadObj.Kitchen_Kitchen_Table__c}"/> <apex:outputField value="{!leadObj.Kitchen_Microwave__c}"/> <apex:outputField value="{!leadObj.Kitchen_Range_Stove__c}"/> <apex:outputField value="{!leadObj.Kitchen_Refrigerator__c}"/> <apex:outputField value="{!leadObj.Living_Arm_Chair__c}"/> <apex:outputField value="{!leadObj.Living_Coffee_Table__c}"/> <apex:outputField value="{!leadObj.Living_End_Table__c}"/> <apex:outputField value="{!leadObj.Living_Large_Entertainment_Center__c}"/> <apex:outputField value="{!leadObj.Living_Lazy_Boy_Recliner__c}"/> <apex:outputField value="{!leadObj.Living_Love_Seat__c}"/> <apex:outputField value="{!leadObj.Sofa__c}"/> <apex:outputField value="{!leadObj.Living_Sofa_Bed__c}"/> <apex:outputField value="{!leadObj.Sofa_Sectional__c}"/> <apex:outputField value="{!leadObj.Living_TV__c}"/> <apex:outputField value="{!leadObj.Living_TV_Stand__c}"/> <apex:outputField value="{!leadObj.Misc_Auto_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_Bicycle__c}"/> <apex:outputField value="{!leadObj.Misc_Children_s_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_Children_s_toy_car__c}"/> <apex:outputField value="{!leadObj.Misc_Containers__c}"/> <apex:outputField value="{!leadObj.Misc_Exercise_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_Garden_Tools__c}"/> <apex:outputField value="{!leadObj.Misc_Golf_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_high_chairs_car_seats_etc__c}"/> <apex:outputField value="{!leadObj.Misc_Ladder__c}"/> <apex:outputField value="{!leadObj.Misc_Lawn_Mower__c}"/> <apex:outputField value="{!leadObj.Misc_Pet_Items_crates_and_beds__c}"/> <apex:outputField value="{!leadObj.Misc_Snow_Blower__c}"/> <apex:outputField value="{!leadObj.Misc_Sports_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_Tool_Box__c}"/> <apex:outputField value="{!leadObj.Office_Bookcase__c}"/> <apex:outputField value="{!leadObj.Office_Cabinet__c}"/> <apex:outputField value="{!leadObj.Office_Computer__c}"/> <apex:outputField value="{!leadObj.Office_Copier__c}"/> <apex:outputField value="{!leadObj.Office_Credenza__c}"/> <apex:outputField value="{!leadObj.Office_File_Cabinet__c}"/> <apex:outputField value="{!leadObj.Office_Office_Chair__c}"/> <apex:outputField value="{!leadObj.Office_Office_Desk__c}"/> <apex:outputField value="{!leadObj.Office_Printer__c}"/> <apex:outputField value="{!leadObj.Office_Secretary_Desk__c}"/> <apex:outputField value="{!leadObj.Office_Shelving_Unit__c}"/> <apex:outputField value="{!leadObj.Office_Side_Chair__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Cooler__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Outdoor_Grill__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Bench__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Chaise__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Coffee_Table__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Dining_Chair__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Dining_Table__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Love_Seat__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_side_table__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Sofa__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Umbrella__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Upholstered_Chair__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Pre-Move Summary"> <apex:outputField value="{!leadObj.Men__c}"/> <apex:outputField value="{!leadObj.Truck__c}"/> <apex:outputField value="{!leadObj.Move_Type__c}"/> <apex:outputField value="{!leadObj.Move_Size__c}"/> <apex:outputField value="{!leadObj.calc_Cubic_Ft__c}"/> <apex:outputField value="{!leadObj.calc_Total_Weight__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Cost Summary"> <apex:outputField value="{!leadObj.Flat_Rate__c}"/> <apex:outputField value="{!leadObj.Travel_Charge__c}"/> <apex:outputField value="{!leadObj.Minimum_Charge__c}"/> <apex:outputField value="{!leadObj.Hourly_Rate__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="1"><apex:pageBlock title="Total Estimated Charges"> <apex:outputField value="{!leadObj.Total_Estimated_Charges__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:outputPanel id="panelId"/> <apex:actionFunction action="{!paramMethod}" name="captureLead" reRender="msg"> <apex:param value="" name="data" assignTo="{!data}"/> </apex:actionFunction> <apex:includeScript value="/resource/1495101312000/modernizr" /> <body> <div> <div id="content"> <div id="signatureparent"> <div></div> <div id="signature"></div></div> <div id="tools"></div> </div> <div id="scrollgrabber"></div> </div> <apex:includeScript value="/resource/1495102943000/jquery" /> <script> (function($) { var topics = {}; $.publish = function(topic, args) { if (topics[topic]) { var currentTopic = topics[topic], args = args || {}; for (var i = 0, j = currentTopic.length; i < j; i++) { currentTopic[i].call($, args); } } }; $.subscribe = function(topic, callback) { if (!topics[topic]) { topics[topic] = []; } topics[topic].push(callback); return { "topic": topic, "callback": callback }; }; $.unsubscribe = function(handle) { var topic = handle.topic; if (topics[topic]) { var currentTopic = topics[topic]; for (var i = 0, j = currentTopic.length; i < j; i++) { if (currentTopic[i] === handle.callback) { currentTopic.splice(i, 1); } } } }; })(jQuery); </script> <apex:includeScript value="/resource/1495101377000/jSignature" /> <apex:includeScript value="/resource/1495102059000/jSignatureCompressorBase30" /> <apex:includeScript value="/resource/1495101503000/jSignatureCompressorSVG" /> <apex:includeScript value="/resource/1495101534000/jSignatureUndoButton" /> <apex:includeScript value="/resource/1495102163000/jSignatureSignHerejs" /> <script> $ = jQuery.noConflict() ; $(document).ready(function() { // This is the part where jSignature is initialized. var $sigdiv = $("#signature").jSignature({'UndoButton':true}) // All the code below is just code driving the demo. , $tools = $('#tools') , $extraarea = $('#displayarea') , pubsubprefix = 'jSignature.demo.' var export_plugins = $sigdiv.jSignature('listPlugins','export'); $('<input type="button" value="Reset">').bind('click', function(e){ $sigdiv.jSignature('reset') }).appendTo($tools) $('<input type="button" value="Capture">').bind('click', function(e){ e.target.value = 'default'; if (e.target.value !== ''){ var data = $sigdiv.jSignature('getData', e.target.value) console.log(data); captureLead(data); e.target.value = 'Capture'; } }).appendTo($tools) if (Modernizr.touch){ $('#scrollgrabber').height($('#content').height()) } }) </script> </body> <apex:pageMessages id="msg" /> </apex:form> </apex:page>



*** CONTROLLER / CLASS ***

public class HIC_SignPageController{
    public string data{get;set;}
    public lead leadObj {get;set;}
    
    public HIC_SignPageController(){
        String leadId = Apexpages.currentPage().getParameters().get('Id');
        leadObj =[select sign__c,name,phone,email,Move_Date__c,Pickup_Address__c,Pickup_Unit_No__c,Pickup_City__c,Pickup_State__c,Pickup_Zipcode__c,Pickup_Notes__c,Delivery_Address__c,Delivery_Unit_No__c,Delivery_City__c,Delivery_State__c,Delivery_Zipcode__c,Appliances_Dishwasher__c,Appliances_Dryer__c,Appliances_Freezer__c,Appliances_Microwave__c,Appliances_Range_Stove__c,Appliances_Refrigerator__c,Appliances_Toaster_Oven__c,Appliances_Washer__c,Bedroom_Armoire__c,Bedroom_Bunk_Bed__c,Bedroom_Changing_Table__c,Bedroom_Chest_of_Drawers__c,Bedroom_Crib__c,Bedroom_Dresser_Long__c,Bedroom_Dresser_Tall__c,Bedroom_Full_Bed__c,Bedroom_King_Bed__c,Bedroom_Night_Stand__c,Bedroom_Queen_Bed__c,Bedroom_Rocker_Glider_Chair__c,Bedroom_Twin_Bed__c,Boxes_Book_Box__c,Boxes_Dishpack_Box__c,Boxes_Large_Box__c,Boxes_Large_Frame_Mirror_Box__c,Boxes_Mattress_Box__c,Boxes_Medium_Box__c,Boxes_TV_Box__c,Boxes_Wardrobe_Box__c,Dining_Buffet__c,Dining_China_Cabinet__c,Dining_Corner_Cabinet__c,Dining_Dining_Chairs__c,Dining_Dining_Table__c,Kitchen_Bakers_Rack__c,Kitchen_Bar_High_Chair__c,Kitchen_Bar_High_Table__c,Kitchen_Butcher_Block_Table__c,Kitchen_Dishwasher__c,Kitchen_Freezer__c,Kitchen_Kitchen_Cabinet__c,Kitchen_Kitchen_Cart__c,Kitchen_Kitchen_Chairs__c,Kitchen_Kitchen_Table__c,Kitchen_Microwave__c,Kitchen_Range_Stove__c,Kitchen_Refrigerator__c,Living_Arm_Chair__c,Living_Coffee_Table__c,Living_End_Table__c,Living_Large_Entertainment_Center__c,Living_Lazy_Boy_Recliner__c,Living_Love_Seat__c,Sofa__c,Living_Sofa_Bed__c,Sofa_Sectional__c,Living_TV__c,Living_TV_Stand__c,Misc_Auto_Equipment__c,Misc_Bicycle__c,Misc_Children_s_Equipment__c,Misc_Children_s_toy_car__c,Misc_Containers__c,Misc_Exercise_Equipment__c,Misc_Garden_Tools__c,Misc_Golf_Equipment__c,Misc_high_chairs_car_seats_etc__c,Misc_Ladder__c,Misc_Lawn_Mower__c,Misc_Pet_Items_crates_and_beds__c,Misc_Snow_Blower__c,Misc_Sports_Equipment__c,Misc_Tool_Box__c,Office_Bookcase__c,Office_Cabinet__c,Office_Computer__c,Office_Copier__c,Office_Credenza__c,Office_File_Cabinet__c,Office_Office_Chair__c,Office_Office_Desk__c,Office_Printer__c,Office_Secretary_Desk__c,Office_Shelving_Unit__c,Office_Side_Chair__c,PatioOutdoor_Cooler__c,PatioOutdoor_Outdoor_Grill__c,PatioOutdoor_Patio_Bench__c,PatioOutdoor_Patio_Chaise__c,PatioOutdoor_Patio_Coffee_Table__c,PatioOutdoor_Patio_Dining_Chair__c,PatioOutdoor_Patio_Dining_Table__c,PatioOutdoor_Patio_Love_Seat__c,PatioOutdoor_Patio_side_table__c,PatioOutdoor_Patio_Sofa__c,PatioOutdoor_Patio_Umbrella__c,PatioOutdoor_Patio_Upholstered_Chair__c,Men__c,Truck__c,Move_Type__c,Move_Size__c,calc_Cubic_Ft__c,calc_Total_Weight__c,Flat_Rate__c,Travel_Charge__c,Minimum_Charge__c,Hourly_Rate__c,Total_Estimated_Charges__c from lead where id =: leadId];
    }
    
    public void paramMethod(){
        leadObj.sign__c= '<img src="'+data+'"/>';
        system.debug('-------Data*****' +Data);
        try{ 
            update leadObj;
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'Thank you for confirming your moving quote. We look forward to serving you. You may close this window.'));
        }catch(Exception e){
        }
         
    }


}




*** CONTROLLER / CLASS ***


@isTest( seeAllData = true )
public class HIC_SignPageControllerTest{

    static testmethod void Testing(){
    
    
        
        Lead tempLead = [ SELECT id FROM Lead LIMIT 1].get( 0 ) ; 
        string leadId = tempLead.id ;
        pagereference Call = new pagereference( '/apex/HIC_SignPage?id='+leadId );
        test.setcurrentpage( Call ) ;
        HIC_SignPageController abc = new HIC_SignPageController() ;
        abc.paramMethod() ;
        //ApexPages.currentPage().getParameters().put('Id',objLeadCenter.id);

        //String leadId = Apexpages.currentPage().getParameters().get('Id');
        
        //signPage.
    
    }


}
Hi All,
I have created a Web to Lead form and put it into the website. It is working fine when I fill that form but I am getting many random Leads as well after putting that form into the website whose name start with a number and Emails are different. These random records are generating in every 10-15 minutes. Kindly review my code and provide me the solution.

<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

<input type=hidden name="oid" value="00D58000000OYjZ">
<input type=hidden name="retURL" value="http://friendsofdesign.net/thank-you"">
<input type="text" name="first_name" id="first_name" maxlength="100" placeholder="First Name" style="margin:0 0 3px 0;width:48%;float:left;clear:none;" required>
<input type="text" name="last_name" id="last_name" maxlength="100" placeholder="Last Name" style="margin:0 0 3px 0;width:48%;float:right;clear:none;" required>
     <input type="email" name="email" id="email" maxlength="100" placeholder="Your Email Address Here" style="margin:0;clear:both;margin-top:3px;width:100%;padding:10px 5px;font-size:1em;" required>

<select name="how_did_you_hear_about_us" class="select is_empty" id="lead_source" name="lead_source" style="margin-top:3px;" required><option value="None">How Did You Hear About Us?</option><option value="Advertisement">Advertisement</option>
<option value="Employee Referral">Employee Referral</option>
<option value="Other">Other</option>
<option value="RoadShow">RoadShow</option>
<option value="Career Expo">Career Expo</option>
<option value="Repeat Student">Repeat Student</option>
<option value="Cold Call">Cold Call</option>
<option value="External Referral">External Referral</option>
<option value="Online Course">Online Course</option>
<option value="Public Relations">Public Relations</option>
<option value="Sales Mail Alias">Sales Mail Alias</option>
<option value="Seminar-Internal">Seminar-Internal</option>
<option value="Facebook">Facebook</option>
<option value="Web Research">Web Research</option>
<option value="Chat">Chat</option>
<option value="Google">Google</option>
<option value="Twitter">Twitter</option>
<option value="Career Days">Career Days</option>
<option value="Gumtree">Gumtree</option>
<option value="Cape Times">Cape Times</option>
<option value="Cape Argus">Cape Argus</option>
<option value="The Star">The Star</option>
<option value="The Sunday Independent">The Sunday Independent</option>
<option value="Word of Mouth">Word of Mouth</option>
</select>
<select name="what_are_you_interested_in" class="select is_empty" id="00N5800000BLbi5" name="00N5800000BLbi5" style="margin-top:3px;" required><option value="None">What Are You Interested In?</option><option value="Full Time 2 Year Digital Design Course">Full Time 2 Year Digital Design Course</option>
<option value="Full Time 1 Year Print Design &amp; Publishing">Full Time 1 Year Print Design &amp; Publishing</option>
<option value="Full Time 1 Year Web Publishing &amp; Interactive Media">Full Time 1 Year Web Publishing &amp; Interactive Media</option>
<option value="Full Time 1 Year Game Graphics &amp; Multimedia Environment">Full Time 1 Year Game Graphics &amp; Multimedia Environment</option>
<option value="Part Time Desktop Publishing">Part Time Desktop Publishing</option>
<option value="Part Time Web Publishing">Part Time Web Publishing</option>
<option value="Part Time Electronic Publishing">Part Time Electronic Publishing</option>
<option value="Part Time Specialised Courses">Part Time Specialised Courses</option>
</select>
<p class="form_element hidden" style="margin: 0px;"><label>Form Type</label><select id="00N5800000BLWNP" class="text_input" title="Form Type" name="00N5800000BLWNP">
<option value="Subscribe">Subscribe</option>
</select></p>
<input type="submit" value="Subscribe" style="margin:10px 0 0 0;text-align:left;padding:10px 7px;">
</form> 
I have two related picklists and I would like one to drive the possible options for the other.

The first picklist has three market types in it: Coal, Wind, Water. The second picklist is a project type under one of these categories, so, if I pick Coal from the first picklist, I want the Project Type picklist to give me project types that correspond with that energy market. These values are different than those that would display if one picks Wind or Water.

Anyone know if there's a simple way to connect these? I am not terribly Salesforce savvy and don't understand how the coding works yet.

Thanks!
can u explain briefly about above application.
 
Thanks & Regards
Rangareddy
I have a cusom page using the standard controller for a custom object.  I am passing in two fields in the URL invocation, and I simply want to Validate/Save the record and return (avoiding a user-initiated Save action).  How should I configure the apex page or form elements to accomplish that.
Hello,

I'm fairly new to Salesforce. We are a charity who get our funding from grant giving trusts. Each trust has an account. My question is:

Can one account have more than one opportunity at the same time?

Appreciation in advance.

Elizabeth

I need to automatically assign (as record owner) account records at the end of every day (or early in the morning tomorrow) to 3 end users, if the account records created today meet certain criteria.

 

for example.  let's say the record assignment should occur at 1 am tomorrow or right after midnight, if the account was

 

-created today

-of priority (custom field) "high"

-of type="partner". 

 

accounts NOT meeting those criteria should be ignored.

 

so...let's say today 40 records were created today meeting those criteria above. 

 

now what i need, is for those 40 accounts to be distributed as evenly as possible to 3 SF users as record owner

 

obviously, 40/3=13.333 records per user, which is a problem.  

 

i don't think (though I sincerely hope) i can use workflow/timed field updates to do this, because the goal is to EVENLY or as evenly as possible distribute accounts meeting the above criteria to these 3 users.   

 

this automated job needs to occur once a day at the end of the day or early in the morning of the following day.  doesn't matter.  the point is that we need to look at account records created today meeting a few criteria, and auto update the account owner for those records evenly among three users.

 

please.  help.  thanks a lot guys.

Hi all -

 

Can you please suggest a starting point for learning required code - APEX/Visualforce (or another method) for enabling drag and drop functionality on the front-end - for users and even internal staff. For example, if creating a blueprint and have objects such as walls, roof, chiminey, ... and wanted to pick each object up and move to respective place...

 

Please let me know if you need any more information.

 

Thanks!

 

Mike

I do not want all of my Mac Address Book names put up in to my SFDC addresses... I only want the contacts and accounts in SFDC to be copied down (and maintained in) my Address Book.

 

Is there a way to configure SF3 or some other tool so that I can keep my SFDC data apart from my personal data? It seems crazy to have my dentist listed in my SFDC records!

 

Thanks - 

charles

Hi,

I have created an Object called Daily Diet. It holds the information of daily diet of a patient. It has following fields:

Patient - Master
Date - Date
Diet -Lookup
Food Item - Lookup
Consumed Quantity - Decimal

Eg: Mark - 12.10.2008 - Breakfast - Biscuit - 5  => Daily Diet ID 1 (Name Field)
      Mark - 12.10.2008 - Breakfast - Tea - 1 => Daily Diet ID 2

Currently, if I add new record with the same values, it will be simply added
    Mark - 12.10.2008 - Breakfast - Biscuit - 6 => Daily Diet ID 3

Similarly, if I change Tea to Biscuit in record 2, it will be like 
Mark - 12.10.2008 - Breakfast - Biscit- 1=> Daily Diet ID 2

So, I have three records with same data. How can I prevent it ?
  • October 28, 2008
  • Like
  • 0