• Anil Bolisetty 2
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 11
    Replies
Hello,

I have created some design attributes in my lightnign component,can i use labels when i use the component on the record page

Tried to search but could not find any answer but if any it would be of great help

Thanks
Anil
Hello,

could some one help me in parsing the below json,

{
"d": {
"results": [
{
"__metadata": {
"id": "https://testasugo.sharepoint.com/_api/Web/GetFolderByServerRelativePath(decodedurl='/Shared Documents/Salesforce/Salesforcetwo')",
"uri": "https://testasugo.sharepoint.com/_api/Web/GetFolderByServerRelativePath(decodedurl='/Shared%20Documents/Salesforce/Salesforcetwo')",
"type": "SP.Folder"
},
"Name": "Salesforcetwo"
},
{
"__metadata": {
"id": "https://testasugo.sharepoint.com/_api/Web/GetFolderByServerRelativePath(decodedurl='/Shared Documents/Salesforce/sub Salesforce')",
"uri": "https://testasugo.sharepoint.com/_api/Web/GetFolderByServerRelativePath(decodedurl='/Shared%20Documents/Salesforce/sub%20Salesforce')",
"type": "SP.Folder"
},
"Name": "sub Salesforce"
}
]
}
}


if i am using deserialization as i cannot use __metadata variable i am always getting null,could you help me in getting the value of __metadata in apex
Hello,

Can any one help me with apex class or steps  to get the access token to upload file to share point

Thanks
Anil
I need to traverse through case which has child and so on , not sure about how many levels deep is there any better way rather than do with recursion so that i do not hit soql limits ?
Hello,

I am using lightning:datatble to display some list i have a requirement to use filters like start date end date and 2 picklist values ,user can choose any combination to update the list can any one suggest better design ?
We need to load initilal load on big object ,can we use batch apex if not any other solutions ?
Hello,

I have a custom object where an record can have child and in turn child can have one more child ,could any one help me with the logic to retrieve all the child records give the id of the parent record
Hello,

I need to install managed package into my scratch org (paid so i dont have the id ) into scratch org could any one help me
Can some help me with the design to follow to notify salesforce changes to external rest api
If i create a new account in salesforce it should be notified to external system through rest api
which is the best way ? to use triggers or batch or any other ?
Hi,

I am using standardvalueset to deploy contract status picklist value into scratch org but i am getting

force-app\main\default\standardValueSets\ContractStatus.standardValueSet-meta.xml                     Field: null is not a picklist (9:20)

Can any one help me
Hello,

I am trying to convert sandbox metadata to dx format metadata,but i am facing issues with recordtype id and picklist values on standard objects any help would be appreciated
Hello,

Need to use lightning:tree ,i want to have the logic to build the nested json in controller.js rather than controller which uses apex

Thanks in advance for the help
Hello,

Looking for senior salesforce developer with 5 + experience in apex ,visualforce lightning for a potential onsite position

Intrested people can mail me on anil.boliset@gmail.com
Hello,

I am using lightning:datatble to display some list i have a requirement to use filters like start date end date and 2 picklist values ,user can choose any combination to update the list can any one suggest better design ?
How can I catch the server error message in JS for LWC. I have a trigger for object A and for this object I have LWC where I adding new records. Trigger checking whether percents on object is equal 100. When record has less than 100% show message "ABC".
I would like to get the same error message when I creating new record using LWC. How may I do this using JS for LWC ?
Thanks !
updateRecord(record)
                // eslint-disable-next-line no-unused-vars
                .then(() => {
                    this.dispatchEvent(
                        new ShowToastEvent({
                            title: 'Success',
                            message: 'Record Is Updated',
                            variant: 'Success',
                        }),
                    );
                })
                .catch(error => {
                    this.dispatchEvent(
                        new ShowToastEvent({
                            title: 'Error on data save',
                            message: error,
                            variant: 'error',
                        }),
                    );
                });
Hi All,

Add/Remove Records using LWC.

If any one want to create Add/Remove multiple records in lightning web component dynamically then please refer this post. 

Features:
1. Add rows using plus( + ) button.
2. Dynamic Add/Remove record row.
3. Proper Serial Number in table. For each index starts from 1.
4. Clear All Feature.
5. Save button label change button.
6. Toast Message after record succesfully inserted.

Refer the code in below post...

Like this Post if it's helps to any one !!!

Thanks,
Maharajan.C
Hi...

I'm creating a Lightning component and use the Cytospace javascript library from https://cytoscape.org/
 
<ltng:require scripts="{!join(',', 
                $Resource.cytoscape + '/cytoscape.min.js', 
                $Resource.cytoscape + '/cytoscape.cjs.js')}"
                afterScriptsLoaded="{!c.setup}"/>

I got the following error: Custom Script Eval error in 'ltng:require' [SecureDOMEvent: [object Event] {key: {namespace":"c"}}]

I just follow the SF documentation at https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_libs_platform.htm

How could I validate if the Cytospace library can be used or not in Salesforce?

Thanks
Hi,

I am trting to populate the contacts task in my application object,but I am trying to passng the contactId ,confuse over it how to do.
Kindly suggest!!!!

Here is my code.

 public static list<Task> getContactTask(string contactId){
  list<task> contactTask=new list<task>();
        list<contact> consList=[select id,name,(select id from applications__r) from contact where id=:contactId];
       list<Task> tsk=[select id,whoId from task where whoId=:consList[0].id];
        system.debug('Task' +tsk);
        return tsk;
}
}

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes"
                access="global" controller="ContactActivityHistory">
    
    <aura:attribute name="recordId" type="Id"/>
   
    <aura:attribute name="newTask" type="Task" default="{'sobjectType':'Task'}"/>
    <aura:attribute name="tasks" type="Task[]"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    
    <aura:iteration items="{!v.tasks}" var="item">
        {!item.Subject}, {!item.ActivityDate}<br/>
    </aura:iteration>
    
</aura:component>


Js.
({
    
    doInit : function(component, event, helper)
    {
        console.log('Test activity');
        var action = component.get("c.getContactTask");
        console.log('Test Activity @@@@');
        // var action=component.get('v.recordId');
        console.log(component.get("v.recordId")); 
        action.setParams({            
            ContactId : component.get('v.recordId')
        });
        
        console.log('Test my contact record activity ' +component.get('v.recordId'));
        action.setCallback(this, function(response) {
            var state = response.getState();
            if(state === "SUCCESS"){
               // var records = response.getReturnValue();
               // console.log('Server-> ' + JSON.stringify(records));
                alert("From server: " + response.getReturnValue());
                var newItems=[];
                for (var i=0; i< records.length; i++)
                {
                    var record = records[i];
                    console.log('record-> ' + JSON.stringify(record));
                    
                    //   var Item = {title: record.Name, id: record.Id, status: "Unassigned"};
                    //  console.log('Item-> ' + JSON.stringify(Item));
                    
                    newItems.push(record);
                    console.log('newItems-> ' + JSON.stringify(newItems));
                }
                component.set("v.tasks", newItems);
                
                
            } 
            else if (state === "ERROR") {
                var errors = response.getError();
                if (errors) {
                    if (errors[0] && errors[0].message) {
                        console.log("Error message: " + 
                                    errors[0].message);
                    }
                }
                
            }            
            
        });
        $A.enqueueAction(action);
        
        
    }  
})


Thanks
 
Hello ,

i need to open the record in dymanic tab in community. currently no click action is bein performed

code:

cmp:

    <aura:handler label="Open Tab" name="oSelectedRecordEvent" event="c:selectedsObjectRecordEvent" action="{!c.handleComponentEvent} " />


controller:

        
handleComponentEvent: function(component, event, helper) {
      var navEvt = $A.get("e.force:navigateToSObject");
        var workspaceAPI = component.find("workspace");
        workspaceAPI.openTab({
            pageReference: {
                "type": "standard__recordPage",
                "attributes": {
                   "recordId": selectedAccountGetFromEvent.Id,
                    "actionName":"view"
                },
                "state": {}
            },
            focus: true
        }).then(function(response) {
            workspaceAPI.getTabInfo({
                tabId: response
        }).then(function(tabInfo) {
            console.log("The recordId for this tab is: " + tabInfo.recordId);
        });
        }).catch(function(error) {
            console.log(error);
        });
navEvt.fire();
    },
   
    handleComponentEvent : function(component, event, helper) {
          var navEvt = $A.get("e.force:navigateToSObject");
        var workspaceAPI = component.find("workspace");
        workspaceAPI.openTab({
           "recordId": selectedAccountGetFromEvent.Id,
            focus: true
        }).then(function(response) {
            workspaceAPI.getTabInfo({
                  tabId: response
            }).then(function(tabInfo) {
            console.log("The url for this tab is: " + tabInfo.url);
            });
        })
        .catch(function(error) {
               console.log(error);
        });
navEvt.fire();
    },
    
   
    handleComponentEvent : function(component, event, helper) {
          var navEvt = $A.get("e.force:navigateToSObject");
        var workspaceAPI = component.find("workspace");
        //var URLlink= HYPERLINK("https://csp2dev-mergedealer.cs102.force.com/CSPDealerCommunity/s","_self" );
        workspaceAPI.openTab({
            url: URLlink,
            focus: true
        }).then(function(response) {
            workspaceAPI.getTabInfo({
                tabId: response
            }).then(function(tabInfo) {
            console.log("The recordId for this tab is: " + tabInfo.recordId);
            });
        }).catch(function(error) {
                console.log(error);
        });
navEvt.fire();
    },

    
    
    Thanks in advance

 
Hello,

I have created some design attributes in my lightnign component,can i use labels when i use the component on the record page

Tried to search but could not find any answer but if any it would be of great help

Thanks
Anil
I am trying to create related conact to an account passing the accountid into the url,url heck doesn't work properly when JS hits the url and opens a new window ' Account name doesn't auto populate in the new contact window in Lightning'-

https://dharmendraex-dev-ed.lightning.force.com/lightning/o/Contact/new?Accountid=0017F00000C34HOQAZ

Am I missing something? Please help me out on this .
 
Can some help me with the design to follow to notify salesforce changes to external rest api
If i create a new account in salesforce it should be notified to external system through rest api
which is the best way ? to use triggers or batch or any other ?
Hello,

Need to use lightning:tree ,i want to have the logic to build the nested json in controller.js rather than controller which uses apex

Thanks in advance for the help