• krishna casukhela
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 4
    Replies
I am using Opportuntity object.
When the opportunity Amount field is greater than 500000 then I need to send a email notification to the current user within 1 month and another reminder 7 days before the month ends indicating to him/her that the opportunity amount is greater than 500000.

we can use a workflow but what I want to know is how to send an email alert within 1 month and an reminder 7 days before the current month expires. 
System should be able to identify number of days in a month and automate the process.
Please guide me on how to do this scenairo.

Thanks
Krishna


 
I have a json response as follows
healthClaimLines": [{
        "diagnosisCode": [
            {
              "diagnosisCode": "R50.9",
              "diagnosisCodeDescr": "FEVER, UNSPECIFIED"
            },
            {
              "diagnosisCode": "R50.9",
              "diagnosisCodeDescr": "FEVER, UNSPECIFIED"
            }
          ]
          }],

In the above JSON response, diagnosisCode is duplicated along with the diagnosisCodeDescr
so I need to eliminate the duplcate record and keep only a single record.

A piece of working code helpful to understand.

krishna
                  
  
I have a lightning component as follows

<aura:attribute name="providerPIN" type='String"/>

<label class="slds-form-element__label">Provider PIN</label>
 <div class="slds-form-element__control">

  <lightning:input label=""  maxlength="12" pattern="[0-9 ]+"
aura:id="providerPIN" onchange="{!c.enabledisableFields}"
disabled="{!v.disableProviderPIN}"
messageWhenPatternMismatch="Invalid Provider PIN"
value="{!v.providerPIN}"/>

    </div>
clearSearch : function(component) {
   
         if (component.find("provSpecialityType") && component.get("v.specialityType") && component.get("v.disableProvSpecType") === false){
             if (component.find("provSpecialityType").get("v.validity").valid === true){
                     component.set("v.specialityType",'');
             }
             else{
                 component.set("v.disableBasicSearch",true);
                 var provSpecType = component.find("provSpecialityType");
                 component.find("provSpecialityType").set('v.value','');
                 $A.util.removeClass(provSpecType, 'slds-has-error');
                 component.set("v.specialityType",'');
            }
        }
    }

<lightning:button name="details"  label="Clear"  onclick="clearSearch"/>

When the page Loads for providerPIN I will enter a input as 00012345
so its a valid input

Now if I enter a invalid input as 00123?? and then it shows the validtaon error ,message

Now when I hit the clear Button, the wrong input is cleared bit the validation error msg still remains.

Please let me know how to clear the validtaion error message.
 
<aura:attribute name="disableClick" type="Boolean"/>
<lightning:button variant="base" label="showMe" title="clickMe" disabled="{!v.disableClick}" onclick="{!c.handleClick}"
I am setting component.set("v.disableClick",true) based on some logic in the code.
so the button text becomes unreadable.
But I want the button text to be little bolder so that its at least readable 
Please let me know how to do this
I have a API response as follows.
 
    "practitionerReviewSummary": {
      "avg_overall_rating": 4.15,
      "total_reviews": 4
    }
Inside lightning component I  will show 5 stars (something similar to amazon when we buy a product, we have ratings show in stars)

If its 4 stars then 4 stars will be bold.
But if rating = 4.15 then pls let me know how to do this through code.

Thanks
Krishna
 

I have a piece of code as follows:

<aura:component>
     <lightning:card title="Expenses Form">
    <div class="slds_form">
   
    <div class="slds-form-element slds-form-element_horizontal">
    <label class="slds-form-element__label">Enter Age:</label>
    <div class="slds-form-element__control">
        <lightning:input type="text" aura:id ="inp2" label="" name="input2" value=""/>
    </div>
  </div>
        <br/>
    <div class="slds-form-element slds-form-element_horizontal">
    <label class="slds-form-element__label">Enter Expenses:</label>
    <div class="slds-form-element__control">
        <lightning:input type="text" aura:id ="inp3" label="" name="input3" value=""/>
    </div>
  </div>
   </div>
        
    </lightning:card>
</aura:component>

I want to align the label and the input field side by side horizontally.
I am looking at this URL:
:https://www.lightningdesignsystem.com/components/form-element/#Horizontal

But I am not able to get them horizontally aligned.

Pleae let me know how to do this?

thanks
Krishna

 

I have created custom Lable in salesforce and assigned two values to it.
Name : GPS_Work_Med
Values : ABD1
              ABD2

Now in lightning component i have a comboboBox
In doInit event I am doing like this
var custom_Labels=$A.get("$Label.c. GPS_Work_Med")

Please let me know how to Bind the custom Label values to the comboBox. A working piece of code will be really helpful.

Thanks
Krishna
I have a json which comes from api as follows

{"medicaidDualStatuesResponse": {"readMedicaidDualStatusesResponse": {"medicareMember": [
      {
      "medicaidDualStatus": [      {
         "dualStatusIndicator": "false",
         "source": "MedicaidDualStatusSourceCode",
         "code": "01",
         "codeName": "MedicaidDualStatusCode",
         "effectivePeriod":          {
            "datetimeBegin": "2018-03-01T00:00:00-05:00",
            "datetimeEnd": "2018-07-31T00:00:00-04:00"
         }
      }],
      "medicareIdentifier":       {
         "idSource": "MBI",
         "idValue": "9Y12M55CD02"
      }
   },
      {
      "medicaidDualStatus":       [
                  {
            "dualStatusIndicator": "false",
            "source": "MedicaidDualStatusSourceCode",
            "code": "01",
            "codeName": "MedicaidDualStatusCode",
            "effectivePeriod":             {
               "datetimeBegin": "2018-10-01T00:00:00-04:00",
               "datetimeEnd": "2018-11-30T00:00:00-05:00"
            }
         },
                  {
            "dualStatusIndicator": "false",
            "source": "MedicaidDualStatusSourceCode",
            "code": "01",
            "codeName": "MedicaidDualStatusCode",
            "effectivePeriod":             {
               "datetimeBegin": "2019-01-01T00:00:00-05:00",
               "datetimeEnd": "2019-03-31T00:00:00-04:00"
            }
         }
      ],
      "medicareIdentifier":       {
         "idSource": "MBI",
         "idValue": "9Y12M55CD04"
      }
   },
      {
      "medicaidDualStatus": [],
      "medicareIdentifier":       {
         "idSource": "HICN",
         "idValue": ""
      }
   }
]}}}
 
so in the controller of my lightning component I did as follows
 var medicareMemberList = QMBResponse.medicaidDualStatuesResponse.readMedicaidDualStatusesResponse.medicareMember;

Please let me know how to sort the dates given in the json in descending order. 

I am new to this so do not have much knowledge.
thanks

 
I have a json response as follows

QMBdata = {"medicareMember":[{"medicaidDualStatus":[{"dualStatusIndicator":"false","source":"MedicaidDualStatusSourceCode","code":"01","codeName":"MedicaidDualStatusCode","effectivePeriod":{"datetimeBegin":"2018-03-01T00:00:00-05:00","datetimeEnd":"2018-07-31T00:00:00-04:00"}}],"medicareIdentifier":{"idSource":"MBI","idValue":"9Y12M55CD02"}},{"medicaidDualStatus":[{"dualStatusIndicator":"false","source":"MedicaidDualStatusSourceCode","code":"01","codeName":"MedicaidDualStatusCode","effectivePeriod":{"datetimeBegin":"2018-10-01T00:00:00-04:00","datetimeEnd":"2018-11-30T00:00:00-05:00"}},
    {"dualStatusIndicator":"false","source":"MedicaidDualStatusSourceCode","code":"01","codeName":"MedicaidDualStatusCode","effectivePeriod":{"datetimeBegin":"2019-01-01T00:00:00-05:00","datetimeEnd":"2019-03-31T00:00:00-04:00"}}],"medicareIdentifier":{"idSource":"MBI","idValue":"9Y12M55CD04"}},{"medicaidDualStatus":[],"medicareIdentifier":{"idSource":"HICN","idValue":""}}]}

Now I want the json output as follows i.e new json response

{"medicaidDualStatuesResponse": {"readMedicaidDualStatusesResponse": {"medicareMember": [
      {
      "medicaidDualStatus": [      {
         "dualStatusIndicator": "false",
         "source": "MedicaidDualStatusSourceCode",
         "code": "01",
         "codeName": "MedicaidDualStatusCode",
         "effectivePeriod":          {
            "datetimeBegin": "2018-03-01T00:00:00-05:00",
            "datetimeEnd": "2018-07-31T00:00:00-04:00"
         }
      }],
      "medicareIdentifier":       {
         "idSource": "MBI",
         "idValue": "9Y12M55CD02"
      }
   },
      {
      "medicaidDualStatus":       [
                  {
            "dualStatusIndicator": "false",
            "source": "MedicaidDualStatusSourceCode",
            "code": "01",
            "codeName": "MedicaidDualStatusCode",
            "effectivePeriod":             {
               "datetimeBegin": "2018-10-01T00:00:00-04:00",
               "datetimeEnd": "2018-11-30T00:00:00-05:00"
            }
         },
                  {
            "dualStatusIndicator": "false",
            "source": "MedicaidDualStatusSourceCode",
            "code": "01",
            "codeName": "MedicaidDualStatusCode",
            "effectivePeriod":             {
               "datetimeBegin": "2019-01-01T00:00:00-05:00",
               "datetimeEnd": "2019-03-31T00:00:00-04:00"
            }
         }
      ],
      "medicareIdentifier":       {
         "idSource": "MBI",
         "idValue": "9Y12M55CD04"
      }
   },
      {
      "medicaidDualStatus": [],
      "medicareIdentifier":       {
         "idSource": "HICN",
         "idValue": ""
      }
   }
]}}}


The code before the new json repsonse in my lightning component is as follows:

var QMBdata = QMBResponse.medicaidDualStatuesResponse.readMedicaidDualStatusesResponse;
  console.log('QMBdata = '+ JSON.stringify(QMBdata));
  var code = QMBdata.medicareMember[0].medicaidDualStatus[0].code;
                        component.set("v.code",code);
                        var dateBegins = QMBdata.medicareMember[0].medicaidDualStatus[0].effectivePeriod.datetimeBegin;
                        component.set("v.effectiveDate",dateBegins);
                        var dateEnds = QMBdata.medicareMember[0].medicaidDualStatus[0].effectivePeriod.datetimeEnd;
                        component.set("v.termDate",dateEnds);
                        
Can any one help me in modifying the above javascript code so that I get the result     as the enw json response.

this is ugent. kindly help me out

thanks
krishna
 
I am using Opportuntity object.
When the opportunity Amount field is greater than 500000 then I need to send a email notification to the current user within 1 month and another reminder 7 days before the month ends indicating to him/her that the opportunity amount is greater than 500000.

we can use a workflow but what I want to know is how to send an email alert within 1 month and an reminder 7 days before the current month expires. 
System should be able to identify number of days in a month and automate the process.
Please guide me on how to do this scenairo.

Thanks
Krishna


 
I have a lightning component as follows

<aura:attribute name="providerPIN" type='String"/>

<label class="slds-form-element__label">Provider PIN</label>
 <div class="slds-form-element__control">

  <lightning:input label=""  maxlength="12" pattern="[0-9 ]+"
aura:id="providerPIN" onchange="{!c.enabledisableFields}"
disabled="{!v.disableProviderPIN}"
messageWhenPatternMismatch="Invalid Provider PIN"
value="{!v.providerPIN}"/>

    </div>
clearSearch : function(component) {
   
         if (component.find("provSpecialityType") && component.get("v.specialityType") && component.get("v.disableProvSpecType") === false){
             if (component.find("provSpecialityType").get("v.validity").valid === true){
                     component.set("v.specialityType",'');
             }
             else{
                 component.set("v.disableBasicSearch",true);
                 var provSpecType = component.find("provSpecialityType");
                 component.find("provSpecialityType").set('v.value','');
                 $A.util.removeClass(provSpecType, 'slds-has-error');
                 component.set("v.specialityType",'');
            }
        }
    }

<lightning:button name="details"  label="Clear"  onclick="clearSearch"/>

When the page Loads for providerPIN I will enter a input as 00012345
so its a valid input

Now if I enter a invalid input as 00123?? and then it shows the validtaon error ,message

Now when I hit the clear Button, the wrong input is cleared bit the validation error msg still remains.

Please let me know how to clear the validtaion error message.
 
<aura:attribute name="disableClick" type="Boolean"/>
<lightning:button variant="base" label="showMe" title="clickMe" disabled="{!v.disableClick}" onclick="{!c.handleClick}"
I am setting component.set("v.disableClick",true) based on some logic in the code.
so the button text becomes unreadable.
But I want the button text to be little bolder so that its at least readable 
Please let me know how to do this