function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sailersailer 

Loading the Data from Legacy Sytem

Hi Everyone,

 

I am loading data from the external System.

I have created a field called EUID --the unique Id for the external system.

and at  field level i am not allowing the duplicates.

and at the second scenario .

I will be not getting the EUID values i.e it will be blank.

That record should not be inserted.Suppose if i give the field Required ,even at the page layout the the field will be required.

 

Can i make the field required at API level

 

How to achevie this .Can any one Help .

 

Regards,

Sailed

Best Answer chosen by Admin (Salesforce Developers) 
vbsvbs

@Sailer - If I understand you right, the requirement is to ensure that the external id field is mandatory during data loads and not during the standard UI operations. A good alternative is to use a validation rule that will enforce the "requiredness" for the data loading user/profile. The assumption here is that you have created a separate profile and/or user for this integration/data loading activity.  The formula will look like :

AND($Profile.Name = '<Your Data loader profile name>',  ISNULL(EUID) )

 

All Answers

RoyGiladRoyGilad
Hi Sailed,
You could mark the field as "Required" in the schema level:
Make a field Required while creating it by checking the "Required check box":- This makes that field required for everyone in the organization.

You can do it using the Field Accessability Settings:
https://na2.salesforce.com/help/doc/en/salesforce_pagelayouts_cheatsheet.pdf

Or, if you want it field blank only on several cases, you could create a Validation Rule:
https://na2.salesforce.com/help/doc/en/salesforce_useful_validation_formulas.pdf

Roy
vbsvbs

@Sailer - If I understand you right, the requirement is to ensure that the external id field is mandatory during data loads and not during the standard UI operations. A good alternative is to use a validation rule that will enforce the "requiredness" for the data loading user/profile. The assumption here is that you have created a separate profile and/or user for this integration/data loading activity.  The formula will look like :

AND($Profile.Name = '<Your Data loader profile name>',  ISNULL(EUID) )

 

This was selected as the best answer
Ashish_SFDCAshish_SFDC

Hi Sailer, 

 

This basically means the record should not be loaded if the EUID Field is blank. 

You can try by making thefield required in the page layout. 

Setup | Customize/ Create | Object | Page Layouts | Double Click on the Field | Check the Box - required. 

This should solve the requirement, let us know if there is anything speciific that you are looking for. 

 

Regards,

Ashish